The media family on device "xxxx.bak" is incorrectly formed. SQL Server cannot process this media family.

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    I know this question has been posted before but I can not find a resolution to this issue. Here's what's happening, I am creating a full back up from server A to a network drive. When I run "RESTORE VERIFYONLY FROM DISK" I get the error message "The media family on device "xxxx.bak" is incorrectly formed. SQL Server cannot process this media family."

    Both servers are 2008 and, I tried the BACKUP command with and without the FORMAT option. Also to test the access rights, I created a full back up from server B to the same network drive and ran "RESTORE VERIFYONLY FROM DISK" on it and it was fine.

    I having trouble understanding when you create a full backup from one server right to a network drive, how that file can become corrupt to another server of the same SQL version? Is there some kind of option I am missing in the BACKUP command?

  • Grant Fritchey

    SSC Guru

    Points: 396247

    Are you sure they're exactly the same version of SQL Server? Because it sounds like you're getting a version error. Could the one server be SQL Server 2008R2 and the other is 2008? That will cause this issue. I assume verify only will work from the original server? Can you look at the backup header to validate it's accessible?

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    Server A version = "Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)

    Jun 28 2012 08:36:30

    Copyright (c) Microsoft Corporation

    Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )"

    Server B version = "Microsoft SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64)

    Aug 19 2014 12:21:34

    Copyright (c) Microsoft Corporation

    Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )"

    "RESTORE HEADERONLY FROM DISK" produces the same error message.

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    And yes, "VERIFYONLY" will only work from the original server.

  • Grant Fritchey

    SSC Guru

    Points: 396247

    You might want to go look at the documentation for SP3. Maybe there's something that if fixes that mess with restores from SP2. That's my best guess at the moment.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Grant Fritchey

    SSC Guru

    Points: 396247

    Can you restore the backup on the original server (if it's production, obviously, move it to a different database in the restore)?

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Grant Fritchey

    SSC Guru

    Points: 396247

    Do you have third party software installed on one of the servers for doing backups?

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    Yes I was able to restore the backup to the original server. Yes litespeed is installed on that server but just to clarify, I did not use it to take the backup. I never thought about litespeed causing the error.

  • Grant Fritchey

    SSC Guru

    Points: 396247

    It could be litespeed. It substitutes it's backup process for SQL Server, even if you're not calling it directly. Litespeed has a utility for unpacking backups to make them standard. Run that on the backup. I'll bet it works then.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • Perry Whittle

    SSC Guru

    Points: 233804

    sounds like its a Litespeed backup, a Litespeed backup will not be recognised by the database engine, the backup format is different.

    Litespeed will, however, recognise and restore a native SQL server backup.

    Try the following against the backup file

    exec master.[dbo].[xp_restore_headeronly]

    @filename = N'drive:\path\filename.bak'

    -----------------------------------------------------------------------------------------------------------

    [font="Tahoma"]"Ya can't make an omelette without breaking just a few eggs"[/font] 😉

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    That was it. Litespeed was the issue. I'll just script out everything using litespeed stored procedures. Thanks again for taking the time to help me resolve this issue, much appreciated.

  • Del Lee

    SSCrazy

    Points: 2780

    Any other thoughts on this situation when Litespeed is not involved? I have a SQL2005 database in production that we are preparing to move to a SQL2008 R2 instance. The backup restores fine to a SQL2005 test instance, but we get this error when trying to restore to a SQL 2008 R2 test instance. This started happening about 2 days ago. Prior to this, the restore was working fine on our test 2008 instance. Our other two main production databases restore fine to a 2008 R2 test instance. The inconsistency is frustrating.



    Del Lee

  • dsorensen 74234

    Say Hey Kid

    Points: 670

    Are you FTPing the backup files to allow your target server to access them?

  • Del Lee

    SSCrazy

    Points: 2780

    dsorensen 74234 (8/8/2016)


    Are you FTPing the backup files to allow your target server to access them?

    No, there is no FTPing involved in my scenario.



    Del Lee

  • saurabh.x.sinha

    Ten Centuries

    Points: 1125

    “The media family on device '*.bak' is incorrectly formed. SQL Server cannot process this media family”

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

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

    --> "Backup is correct and one is trying to restore on lower version or backup was done using some third party tool like lite speed ,red gate etc."

    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.

    --> "backup is corrupt"

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

    You can refer demo to prove here: http://saurabhsinhainblogs.blogspot.in/2013/05/the-media-family-on-device-daeppbak-is.html

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply