Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to restore a .BAK in SQL server but get the following error:

Msg 3241, Level 16, State 7, Line 1 The media family on device 'c:\glyn\JA.bak' is incorrectly formed. SQL Server cannot process this media family. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.

I have tried restoring using 2012, 2008 and even 2005 but nothing works, I have used the following query and through the Tasks >> Back up but nothing works, here's my SQL:

RESTORE DATABASE JA FROM DISK='c:\glyn\JA.bak'

Does anyone have any suggestions? I've read that the bak could be corrupt, it was sent to my by another developer on DVD who is working on the project.

share|improve this question

4 Answers 4

I found this that says that your backup file is corrupted. Possibly transfered by FTP in text mode rather than binary.

And this blog that lists how someone else fixed the same problem.

share|improve this answer

Hi Please refer : The media family on device '' is incorrectly formed

/********Quick Answer**************/

If backup is correct and one is trying to restore on lower version

  ----> Error: The media family on device is incorrectly formed. SQL Server       cannot process this media family

If backup is corrupt and either you try to restore on same or lower version

   ----> Error: The file on device  is not a valid Microsoft Tape Format backup set.”
  Note: SQL server doesn’t support restore from higher to lower version. 

/*****************************/

share|improve this answer

I had the same problem, my script was specifying the incorrect FILE type, I had a .bak and I was specifying FILE = 2 which is a .trn.

USE [master]
RESTORE DATABASE [MyNewDB] FROM
DISK = N'D:\MyOldDB.bak'
WITH
    FILE = 1, -- 1 = .bak, 2 = .trn type backup
    MOVE N'MyOldDB' TO N'd:\data\MyOldDB.mdf',
    MOVE N'MyOldDB_log' TO N'd:\data\MyOldDB_log.ldf',
    NOUNLOAD,
    STATS = 5    
GO

I'm not sure if the RESTORE command auto-detects or sets a default for this...

share|improve this answer

the backup is corrupted, it is not uploaded in binary , try uploading again or transfer any other ways, it will be restored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.