Difficulty restoring a differential backup in SQL Server, 2 media families expected, or no files ready for reuse

I have sql backups copied from server A to server B at night.

We want to move the sql server from server A to server B without much downtime, but the files are very large.

I suggested that performing differential backup and recovery would solve the database problem.

  • Copy full backup from server A to copy to server B (10 + gb)
  • Open SQL Server Managment Studio on Server B
  • Right mouse in databases
  • Restore database
  • Enter a new DB name
  • Select "From device" and browse to the backup file.
  • Click OK. It now resorts to the original "full" backup.
  • Check new db using dev application - everything works :)
  • In the source rightmouse database in DB> Tasks> Backup ...
  • Type of backup = Differential, Backing up to disk, adding a new file and deleting the old one (a small file requires a small amount of interruptions)
  • Copy diff backup to new db
  • Right mouse in DB> Tasks> Restore> Database

This is where I am stuck. If I add both the new differential file and the original backup to the recovery process, I get an error

The media loaded on "M:\path\to\backup\full.bak" is formatted to support 1 media families, but 2 media families are expected according to the backup device specification. RESTORE HEADERONLY is terminating abnormally. 

But if I try to recover using only the differential file, I get

 System.Data.SqlClient.SqlError: The log or differential backup cannot be restored because no files are ready to rollforward. (Microsoft.SqlServer.Smo) 

Any idea how to do this? Is there a better way to restore backups with limited downtime?

+6
sql-server backup restore
source share
1 answer

See "E-book 2008" Performing a complete database recovery for detailed information and code.

The error may be caused by either a full or differential backup trying to restore the backup device specification immediately (it may need to be changed).

Make them one at a time (basic idea):

Back up tail_log.

Restore first with NORECOVERY first.

Restore differential using NORECOVERY.

Restore a log using NORECOVERY.

Restore tail_log using NORECOVERY.

Then, when done, Restore with RECOVERY.

+5
source share

All Articles