Reputation: 321
I have a SQL Server database on my server and I've taken a backup of it. When I try to restore it to a local machine it is throwing me an error and the process is terminating abnormally,
I have created a new empty database in my local machine and trying to restore the .bak
into this database with the following code:
RESTORE FILELISTONLY FROM DISK = 'C:\Users\user\Documents\Downloads\LiveDB.bak'
To get LogicalName for both datafile and logfile and I got the error as follows:
Msg 3241, Level 16, State 13, Line 1
The media family on device 'C:\Users\user\Documents\Downloads\LiveDB.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
What is this error causing?
If this is the wrong way to restore a database from a backup file, can someone tell me the step by step procedure to get it working.
Thanks in advance.
Upvotes: 0
Views: 11244
Reputation: 1517
My mistake was I was restoring from a differential backup instead of a full backup.
Upvotes: 0
Reputation: 119166
This is almost certainly due to the server versions being different. You will get this message if you attempt to restore the database from a newer version of SQL Server to an older version - this is not possible to do. To check the versions, run this command on both servers:
SELECT @@VERSION
Compare the results and make sure the server which you are restoring to is the same version or newer than where the backup was taken.
Upvotes: 3