0
votes

I have used below to restore .bak file which is in remote server and it is not working.

restore database Status_backup
from disk = N'E:\Status bak files\Status_backup_201404302300.bak'
with 
    move 'Status_backup_201404302300' to N'E:\Files\Status_backup_201404302300.mdf',
    move 'Status_backup_201404302300' to N'E:\Files\Status_backup_201404302300.ldf'

I am getting below error

Msg 3201, Level 16, State 2, Line 25 Cannot open backup device 'E:\Status bak files\Status_backup_201404302300.bak'. Operating system error 3(The system cannot find the path specified.). Msg 3013, Level 16, State 1, Line 25 RESTORE DATABASE is terminating abnormally.

Please suggest what is error in the script?

2
It is clearly said in error message: "The system cannot find the path specified.". Make sure backup file exists at location you've specified and accessible to account under which SQL server is running.Andy Korneyev
in folder 10 .bak files exists with datetime stamp. which account do I need to check?Amelia

2 Answers

0
votes

Your path contains spaces. Add double quotes or change the path name to something without spaces.

As it turns out in the comments, your actual problem is the location of the file being on another machine. You try to access a remote file with a local path. You should copy the backup file(s) to your local computer (where your sql server apparently is) and try again with the corresponding path.

0
votes

Try this;

RESTORE DATABASE Status_backup 
FROM DISK = 'E:\Status bak files\Status_backup_201404302300.bak'
WITH
   MOVE 'Status_backup_201404302300' TO 'E:\Files\Status_backup_201404302300.mdf', 
   MOVE 'Status_backup_201404302300_log' TO 'E:\Files\Status_backup_201404302300.ldf', 
REPLACE