Script log backups
dwjongbloed
Posts: 30
I have an interesting question. I am wanting to come up with someway to back up my T-logs so I can run a script on my DR server to restore them. I have this running for my full backups but my log backups are a little bit more tricky as I am doing one every hour. Right now the backup is doing a <AUTO> for the name but I am not sure of how to go about what it is I am wanting to do. Any ideas would be greatly appreciated.
Thanks
Thanks
Comments
E.g. will cause SQL Backup to pick up all files matching the search pattern 'AdventureWorks*log*.sqb' in the 'g:\backups\' folder, sort them, and restore them in order.
2. Successfully log files can be moved to another location, using the MOVETO option.
E.g. will move all successfully log backup sets to the ':\backups\restored' folder.
The above 2 features of SQL Backup should help to address your requirements.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I am thinking that this is going to be more difficult than I want it to be and will just end up writing instructions to do it in the GUI screen as I am needing this in case we have a disaster and I am not around
If the full restore is a scheduled job, I would add a job step before the restore step, to first move all existing trx log backup files to another folder (e.g. using the DOS MOVE command). In this way, any trx log backups that exist in the folder after the full restore are 'relevant' to that full restore.
If it's a manual restore in a disaster recovery situation, I guess you'll just need to manually sort the files first.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8