none
Backup / Restore to different server - "Media family is incorrectly formed"

    Question

  • I am very new to using MS SQL Server.  I offered to help a friend out not knowing what I was getting into.

    I have a .bak database, I downloaded and installed MS SQL Server Express 2005 - 9.00.1399.06 and I using Management Studios.

    I right click on Databases, select Restore Database - select FROM Device: and I get this error.

    TITLE: Microsoft SQL Server Management Studio Express
    ------------------------------
    
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
    
    ------------------------------
    ADDITIONAL INFORMATION:
    
    The media family on device 'F:\afmfirearmsdb.bak' is incorrectly formed. SQL Server cannot process this media family.
    RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)
    
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476
    
    

    And when I run the following command that I found on these forums

    RESTORE VERIFYONLY FROM DISK='f:\afmfirearmsdb.bak' 

    I get this error:

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

    I am very much a noob when it comes to working with this stuff, so all the help would be awesome.

     

    Thanks

    Sunday, January 23, 2011 7:55 PM

Answers

  • Where did the afmfirearmsdb.bak file come from?  This error can occur when you attempt to restore a database backup that was taken with SQL Server 2008 onto a server running SQL Server 2005.  If the backup is from 2008, you will need to use SQL Server 2008 Express to restore it - backups (and databases) are not backwards compatible with older versions.
    Monday, January 24, 2011 2:25 AM
    Answerer
  • Seems like the backup file is corrupted. You can do a RESTORE VERIFYONLY to confirm if the backup file is usable.

     

    RESTORE VERIFYONLY
    FROM DISK='F:\afmfirearmsdb.bak'

    GO

    IF @@ERROR = 0
    BEGIN
       PRINT ‘Backup usable'
    END
    ELSE
    BEGIN
        PRINT ‘Backup not usable'
    END
    GO

     

    Also, please install the latest service packs and try restoring.

     

    Monday, January 24, 2011 12:21 AM

All replies

  • Seems like the backup file is corrupted. You can do a RESTORE VERIFYONLY to confirm if the backup file is usable.

     

    RESTORE VERIFYONLY
    FROM DISK='F:\afmfirearmsdb.bak'

    GO

    IF @@ERROR = 0
    BEGIN
       PRINT ‘Backup usable'
    END
    ELSE
    BEGIN
        PRINT ‘Backup not usable'
    END
    GO

     

    Also, please install the latest service packs and try restoring.

     

    Monday, January 24, 2011 12:21 AM
  • Where did the afmfirearmsdb.bak file come from?  This error can occur when you attempt to restore a database backup that was taken with SQL Server 2008 onto a server running SQL Server 2005.  If the backup is from 2008, you will need to use SQL Server 2008 Express to restore it - backups (and databases) are not backwards compatible with older versions.
    Monday, January 24, 2011 2:25 AM
    Answerer
  • Where did the afmfirearmsdb.bak file come from?  This error can occur when you attempt to restore a database backup that was taken with SQL Server 2008 onto a server running SQL Server 2005.  If the backup is from 2008, you will need to use SQL Server 2008 Express to restore it - backups (and databases) are not backwards compatible with older versions.

    Correct. Restore Headeronly can tell the information about the backup.

    RESTORE HEADERONLY FROM DISK='f:\afmfirearmsdb.bak' 
    
    if above also fails then the backup media is corrupted.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Monday, January 24, 2011 2:30 AM
    Moderator
  • It's worth noting that running RESTORE HEADERONLY on 2005 (or 2000 - I tried both) will still not be able to read the header of a 2008 backup - the same error message will appear.
    Monday, January 24, 2011 2:44 AM
    Answerer
  • How did u get the bak file. If you download from ftp, use binary mode to download. Then restore. Hope it will help.
    Sunday, March 11, 2012 4:55 PM
  • hello dsimi..

    How to download in binary mode?

    I don't know exactly ftp and binary mode. Pls explain me detail if u can

    Thanks a lot!

    • Proposed as answer by ACDBA Thursday, August 02, 2012 4:38 PM
    • Unproposed as answer by ACDBA Thursday, August 02, 2012 4:38 PM
    Wednesday, August 01, 2012 4:51 AM
  • This question is very old, but no one answered so.. . I used filezilla to achieve same. Seems you are looking for FTP options.

    You can use third party tools and call them in your program to download. This link might help

    http://www.inmotionhosting.com/support/website/file-management/corrupt-file-ftp-transfer

    Solution to fix error is available @  http://saurabhsinhainblogs.blogspot.in/2013/05/the-media-family-on-device-daeppbak-is.html

    Filezilla is freely available to download. 


    Thanks Saurabh Sinha

    Blog Twitter LinkedIn Gallery Facebook

    Please click the Mark as answer button and vote as helpful if this reply solves your problem




    Monday, January 09, 2017 11:31 AM