NetWorker: NMM SQL Differential Restore fails with "This differential backup cannot be restored…"
Summary: NMM SQL Differential Restore of database X from SQL Host A to Host B fails with "This differential backup cannot be restored because the database has not been restored to the correct earlier state" ...
Symptoms
NetWorker Module for Microsoft (NMM) SQL restore of differential backup of database X fails.
On SQL Host A, the Customer performs.
- SQL VDI Full backup weekly
- SQL VDI Cumulative-Incremental (differential) backup daily
- SQL VDI Logsonly (transcation logs) hourly
On SQL host B, the customer tries to restore the differential backup from Monday. It fails with:
38008:nsrsqlrc: This differential backup cannot be restored because the database has not been restored to the correct earlier state. 153416:nsrsqlrc: (Error: 3136)
Cause
Examining the output from:
select * from msdb.dbo.backupset where database_name = 'DB NAME'
We can see that SQL Server performed.
- 9 PM and 10 PM full backup on Sunday
- 9 PM type "D"
- 10 PM type "D"
Then it performed differential backups daily (type "I") starting Monday each day depending on the full backup at 10 PM. This is the last full backup.
Examining NW Server for the full and differential backupsmminfo and daemon.raw of NetWorker server
mminfo -avoto -c Source_SQL_clientName
Reveals that NetWorker server NW1 only recorded one full backup on Sunday = the 9 PM.
It was then discovered that the SQL Host A actually performed.
- Full backup to NW1 Server at 9 PM Sunday
- Diff backup to NW1 Server at 9 PM Monday
But it also performed a Full backup to the NW2 server at 10 PM Sunday.
Therefore when HOST B tries to restore differential backup from Monday from NW1, the SQL Server tries to restore the full from 9 PM on NW1 server.
However, the Differential backup depends on a save set from 10 PM which is not on NW1 because it was saved to "NW2"
Resolution
Use the same NetWorker server for all backup levels:
- Full
- Cumulative-incremental
- Logsonly