question

AndrewKennard-1214 avatar image
0 Votes"
AndrewKennard-1214 asked Yufeishao-msft commented

Root C Backup file cannot be found

Hi

I made a backup of an SQL database using SSMS on a remote to me SQL server

The backup seemed to go OK

It was called C:MyBackup.bak

However it is nowhere to be found on the server

I know C: is not the same as C:\

But any ideas where it might be ?

I need to find it to be able to delete it

Thanks

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please do not forget to mark as accepted answer wherever information provided to you were helpful.

Regards

0 Votes 0 ·
OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered

I know C: is not the same as C:\ But any ideas where it might be ?

If you backup a database on a remote server then the drice like C is the drive on the remote server, not on your local machine.
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BjoernPeters avatar image
0 Votes"
BjoernPeters answered BjoernPeters edited

If you do not name the backup file correctly, it may be interpreted as a filename like your example... I would expect that file in the default backup directory

https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/backup-devices-sql-server?view=sql-server-ver15#BackupFileDiskPath

When you are specifying a backup file, you should enter its full path and file name. If you specify only the file name or a relative path when you are backing up to a file, the backup file is put in the default backup directory. The default backup directory is C:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Backup, where n is the number of the server instance. Therefore, for the default server instance, the default backup directory is: C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup.

Not just C:\ but the instance root folder, which could be, e.g., D:\MSSQL13.MSSQLSERVER\MSSQL\Backup

https://www.mssqltips.com/sqlservertip/1583/changing-the-default-sql-server-backup-folder/



Edit: And - of cause - what Olaf said... on the server, not on your workstation

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered

Using "C:MyBackup.bak" would have put the backup in the "current" directory. This is likely C:\Program Files\Microsoft SQL Server\MSSQL##.MSSQLSERVER{instancename} or somewhere under it on the remote server.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yufeishao-msft avatar image
0 Votes"
Yufeishao-msft answered

Hi @AndrewKennard-1214,

C: means the file in whatever the current directory is on dirve C, while C:\ means the file in the root directory of the drive C, so you may find the backup file on your remote


-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.