“Copy-DbaDatabase" command do not allows you to restore Diff backups with -continue flag #9696
Unanswered
Udham-Singh1113
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have been exploring various tools for migrating our SQL Server 2016 to SQL Server 2022 and discovered the dbatools PowerShell utility. Initially, I found it to be incredibly effective. However, I've encountered a challenging situation that I would like to share.
I am working with a server that hosts over 700 databases. Some of these databases are set to the simple recovery model, while others are in the full recovery model. To ensure a seamless migration, we decided to use the Copy-DbaDatabase command. Our plan was to take differential backups at the cut-over time and restore it on new server to minimize the downtime. Here’s the high-level outline of our strategy:
Six hours before the cut-over time: We will take a full backup and restore it on the SQL Server 2022 instance in a No-Recovery state using the following command:
Copy-DbaDatabase -Source SQL2016 -Destination SQL2022 -AllDatabases -BackupRestore -UseLastBackup -Force -NoRecovery
At the time of cut-over: We intended to take the final differential backup and restore it on the SQL Server 2022 instance with recovery. However, I have learned that it is not possible to restore differential backups using the Copy-DbaDatabase dbatools command along with the -Continue flag. The -Continue flag only allows for the restoration of log backups.
Copy-DbaDatabase -Source SQL2016 -Destination SQL2022 -AllDatabases -BackupRestore -UseLastBackup -Continue
This has created a significant roadblock. While databases in the full recovery model can still be recovered using the log backup files, the databases in the simple recovery model cannot be restored to the cut-over point neither I can recover them using this command. We will need to manually restore the differential backups for these databases and recover them.
Is the behavior of the Copy-DbaDatabase command's -Continue flag, which only permits the restoration of log backups, intended, or could this be a bug? Please take a moment to review this matter.
I look forward to your response. Thank you for your attention.
Regards,
Udham Singh
Beta Was this translation helpful? Give feedback.
All reactions