Skip to main content
Solved

SQL restore in phased way (with norecovery)

  • October 19, 2022
  • 4 replies
  • 761 views

Forum|alt.badge.img+5

Hello,

 

I'm trying to execute a SQL restore from source X to destination Y using java gui. The plan is:

  • restore the last full with no recovery
  • restore the last differential with no recovery
  • restore one by one the transaction log since last differential with no recovery
  • restore last transaction log with recovery

The idea is that when I restore the differential it will restore again the full + differential. It can be noticed by looking at the app size that was restored plus in the logs there are 2 restore statements. Why is not restoring only differential? I didn't used any other option except "norecovery” and "unconditional overwrite”. I thought CommVault will know and restore only the differential. Some of my colleagues did it same way for another server and it worked. Do I miss something in here? There are other options I should check?

Any insight will be appreciated.

Best answer by RubeckDK

Hi.. 

 

“Why is not restoring only differential?”

Maybe because of this advanced restore option hasn’t been selected.. ? 

 

The above is a wild guess only… 

 

/Rubeck

View original
Did this answer your question?

4 replies

RubeckDK
Byte
Forum|alt.badge.img+10
  • Byte
  • 67 replies
  • Answer
  • October 19, 2022

Hi.. 

 

“Why is not restoring only differential?”

Maybe because of this advanced restore option hasn’t been selected.. ? 

 

The above is a wild guess only… 

 

/Rubeck


Forum|alt.badge.img+5
  • Author
  • Byte
  • 11 replies
  • October 19, 2022

I did tried with that already for diff and i get the following error:

"Query Result [Microsoft.SqlServer.Management.Common.ExecutionFailureException:This differential backup cannot be restored because the database has not been restored to the correct earlier state. RESTORE DATABASE is terminating abnormally. An exception occurred while executing a Transact-SQL statement or batch.]”

Earlier restore was the restore of the full backup with norecovery option.


Forum|alt.badge.img+14

@mihaib200 

Hello what you are describing can be referred to as a “Step Restore”

In most cases you would restore the diff first which would restore the full + diff all in one restore than apply each tlog as needed. However, can run a restore for every single ‘step’ but you must leverage the step restore option.

https://documentation.commvault.com/11.26/expert/18268_performing_step_restore_of_sql_transaction_logs.html

“After the database is in a standby state, apply either each differential or transaction log, one at a time, to the database. When you apply the logs one at a time, you can scan the changes committed between each log backup.”

  1. The Advanced Restore Options dialog box is displayed.

  2. On the Options tab, select Step Restore, and then click OK.


Forum|alt.badge.img+5
  • Author
  • Byte
  • 11 replies
  • October 21, 2022

Hello,

I ended up by also creating a support ticket. We discovered together with the commvault support that one of the hourly transaction log backups that ran between my scheduled full backup and the differential I was trying to restore was converted to full (due to some other issues within our backup environment, but doesn't matter here). Obviously was not working. I restored this full that was converted (with no recovery) then the differential that I wanted and all fine. Used Skip Full Backup option for that, but I think it would work also without using it (i will test this as well) because I remember at some point that we did a similar restore.

Thank you both for insight on this. Much appreciated. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings