Error restoring database backup Error restoring database backup database database

Error restoring database backup


Sounds like the backup was taken on a machine whose paths do not match yours. Try performing the backup using T-SQL instead of the UI. Also make sure that the paths you're specifying actually exist and that there isn't already a copy of these mdf/ldf files in there.

RESTORE DATABASE MYDB_ABC FROM DISK = 'C:\path\file.bak'WITH MOVE 'mydb' TO 'c:\valid_data_path\MYDB_ABC.mdf',MOVE 'mydb_log' TO 'c:\valid_log_path\MYDB_ABC.ldf';


When restoring, under Files, check 'Relocate all files to folder'

check 'Relocate all files to folder'


The backup stores the original location of the database files and, by default, attempts to restore to the same location. Since your new server installation is in new directories and, presumably, the old directories no longer exist, you need to alter the directories from the defaults to match the location you wish it to use.

Depending on how you are restoring the database, the way to do this will differ. If you're using SSMS, look through the tabs and lists until you find the list of files and their associated disk locations - you can then edit those locations before restoring.