Sql-server – Restoring corrupted bak file

backupcorruptionrestoresql-server-2008

Our server & Backup data got crashed and we had a recovered the data using the recovery Tool. Currently I am having .BAK Files.
When we are trying to rebuild the DB using the recovered .bak file getting the Errors

when i try restoring through query

RESTORE DATABASE dbName
   FROM DISK = N'Path\To\Backup.bak'
   WITH MOVE 'dbName_DataFileLogicalName' TO 'Path\To\Data.mdf',
        MOVE 'dbName_LogFileLogicalName' TO 'Path\To\Log.ldf',
       REPLACE,
       STATS = 10

i get the error as

Msg 3241, Level 16, State 0, Line 1 The media family on device
'D:\DB\NASH_20160718.bak' is incorrectly formed. SQL Server cannot
process this media family. Msg 3013, Level 16, State 1, Line 1 RESTORE
DATABASE is terminating abnormally.

please help thanks !!

Best Answer

you can get this message in different error/ issues on during the backup/restore process. To identify and fix this problem.

  1. You might using different backup version than what your current database. This is the most probable cause of what I suspect from the error message displayed. You might have a backup file from higher version and now your current server is lower version. you can always restore from lower to higher but can not backward.
  2. The second issue could be, you might have a corrupted backup file. So first make sure you have restore able backup file.
  3. Your backup file might be encrypted. Make sure your backup is not encrypted and if so you might need to find the decryption key.

Hopefully this will resolve your issue.