How to fix Error 3135 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 3135 – “The backup set in file ‘%ls’ was created by %hs and cannot be used for this restore operation”

Why This Error Happens

This error occurs because the backup file (.bak) was created using a different SQL Server component or utility than the one attempting the restore—most commonly, the backup was generated by a third-party backup tool, SQL Server Management Studio Maintenance Plan, or a different SQL Server version/edition that writes a different backup set signature. SQL Server validates the backup header against the engine performing the restore, and when the media family descriptor doesn’t match an expected RESTORE-compatible format, it rejects the operation to prevent data corruption. This can also happen if the .bak file is actually a differential, log, or snapshot-based backup (e.g., from a VSS writer or SAN snapshot tool) that requires a specialized restore path rather than a standard T-SQL RESTORE command.

Step-by-Step Resolution Guide

Step 1: Verify the Backup File’s Origin and Header Information

  • Run RESTORE HEADERONLY FROM DISK = 'C:\Backups\yourfile.bak' in SSMS to inspect the BackupTypeDescription, ServerVersion, and SoftwareVendorId columns.
  • Check if SoftwareVendorId is non-zero (e.g., not 0x00000000) — this indicates a third-party tool (like Veeam, Dell NetBackup, or Idera) created the backup, not native SQL Server.
  • Confirm the ServerVersion matches a version your current SQL Server 2025 instance supports for restore (cross-version restores only work forward, never backward).

Step 2: Use the Correct Tool or Agent for Restoration

  • If SoftwareVendorId indicates a third-party vendor, you cannot use native T-SQL RESTORE DATABASE; you must use that vendor’s SQL Server plugin or agent to perform the restore.
  • Reinstall or verify the third-party backup agent is present and licensed on the Windows Server 2025 host before retrying.
  • For native SQL Server backups, ensure you’re not mixing an .bak file with a .trn (log) or .dif (differential) restore command—match the file type to the correct RESTORE syntax.

Step 3: Validate File Integrity and Permissions

  • Navigate to the backup file path (e.g., C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\) and confirm the file is not truncated, zero-byte, or locked by another process.
  • Ensure the SQL Server service account has Read/Write NTFS permissions on the backup folder via Right-click folder > Properties > Security > Edit.
  • Re-copy the backup file from its source (avoid FTP/ASCII-mode transfers that corrupt binary files) and retry the restore using WITH CHECKSUM to detect corruption early.

Step 4: Rebuild the Restore Command with Correct Options

  • If the backup contains multiple media families or stripes, ensure all files are referenced in the RESTORE statement:
  RESTORE DATABASE YourDB
  FROM DISK = 'C:\Backups\file1.bak', DISK = 'C:\Backups\file2.bak'
  WITH REPLACE, RECOVERY;
  • Add WITH FORMAT only if you’re intentionally overwriting an existing backup set header (not for standard restores).

Alternative or Verification Steps

  • After applying a fix, run RESTORE VERIFYONLY FROM DISK = 'C:\Backups\yourfile.bak' to confirm SQL Server now recognizes the backup set as valid before attempting a full restore.
  • If the error persists, treat the .bak file as suspect: request a fresh backup from the source system using native BACKUP DATABASE T-SQL commands to eliminate third-party or cross-platform incompatibilities.