Bug in Backup 7.7.0.18
grumpydba
Posts: 5
Restoring via the GUI
The GUI seems to be confused about copy only backups.
If you have a backup chain like this.
Wed - Diff
Tue - Full copy
Mon - full
and choose to select the Wednesday diff backup, the gui will try and restore the Tuesday copy only and then the Wednesday diff.
Obviously that doesn't work!
The GUI seems to be confused about copy only backups.
If you have a backup chain like this.
Wed - Diff
Tue - Full copy
Mon - full
and choose to select the Wednesday diff backup, the gui will try and restore the Tuesday copy only and then the Wednesday diff.
Obviously that doesn't work!
Comments
What option are you using to select/add the backup files? Is it "Select from backup history" or "Browse for backup files to restore"?
In "Select from Backup history" option: SQL Backup Pro retrieves the files for the selected backup. If you selected a transaction log backup or a differential backup from a backup set, SQL Backup Pro automatically retrieves files for all backups in the set. For example, if you selected a transaction log backup, SQL Backup Pro retrieves all transaction log backups since the corresponding full backup, and the full backup itself. You may see displayed while SQL Backup Pro searches for the appropriate files.
In "Browse for backup files to restore" SQL Backup will tell you if any file is missing or not right to be restored.
More about it here in this article: http://documentation.red-gate.com/displ ... ct+backups
Please let me know the exact steps you followed.
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
SQL Backup Pro will stop at the first full backup that it finds (or to be more precise, the last full back that occurred before your requested restore point) regardless of whether or not it is part of the backup chain. If you use COPY_ONLY backups for ad-hoc backups or for archival backups (like I do for weekly and monthly backups for archival purposes) or any other special case then it creates a problem for you if the COPY_ONLY full backup occurred after the normal full backup because SQL Backup Pro will select the most recent full backup since the selected restore point regardless of the Copy Only status (which is recorded in the is_copy_only column of the backupset table) then the selects the most recent differential since the full backup and before the restore point, if one exists, then the transaction log backups since the differential (or full backup if no differential) up to and including the restore point. I assume that the same would be true for Copy Only transaction backups as well, but I don't use them and have not tested SQL Backup Pro's handling of them so I can't say for certain that those would be included as well and cause your restore to fail on the transaction log backup following the Copy Only transaction log backup.
The Copy Only backups should be included in the list of restore points that you select from when you use the "Select from backup history" option on the "Step 1 of 4" screen for your restore as restoring from a Copy Only backup is a very valid option. But the process that populates the next screen, "Step 1 of 4 (continued)", should filter out backup files that are Copy Only, except for the last file as that can be restored from, from its selection process as you can't restore any files after a Copy Only file is restored from.
Here is an excerpt from the documentation linked by Anu:
"When you click Next, SQL Backup Pro retrieves the files for the selected backup. If you selected a transaction log backup or a differential backup from a backup set, SQL Backup Pro automatically retrieves files for all backups in the set. For example, if you selected a transaction log backup, SQL Backup Pro retrieves all transaction log backups since the corresponding full backup, and the full backup itself. You may see displayed while SQL Backup Pro searches for the appropriate files."
For the most part this is what the restore process does, but as I've noted above it fails to exclude Copy Only backups where appropriate to do so (which is in all cases except when the Copy Only backup is the last or only backup file to be restored).
Since Anu will probably request the exact steps that I follow to restore a database I will include that here:
The restore will start and the full backup will restore successfully but the next backup file (the differential in most cases for me) will fail these or similar errors:
I know of 2 workarounds for this issue.
Both methods take about the same amount of effort so it's really a personal preference.
I thought of making a script that would make the appropriate restore scripts for me (and maybe even run them as well) but I don't do restores often enough for me to spend the time on the project especially since SQL Backup Pro should do this correctly on its own and it is a commercial product and not freeware so I shouldn't have to do workarounds or make my own restore script generator.