What are the challenges you face when working across database platforms? Take the survey

restore to the latest state on 2nd server

MrRobotMrRobot Posts: 6
edited June 8, 2008 11:54PM in SQL Backup Previous Versions
hey guys,

we'll use a 2nd server for disaster recovery, which will normally stay off. when turned on, copy the backups to a local folder, and restore a full backup model database to it's latest state.

once the system has the backup files locally, is there an easy way to automatically achieve this?
like recreating the history from the files in the folder, and restoring a db from the folder to it's latest state?



  • Options
    peteypetey Posts: 2,358 New member
    SQL Backup does not offer the features you described. It does offer the following options, which you might be able to use:

    - use a search pattern for file names
    If your backup is split into 2 or more files, and the search pattern FULL_AdventureWorks_*.sqb will pick up all these files, you can use something like this to perform the restore, instead of having to name all files individually:
    EXEC master..sqlbackup '-sql "RESTORE DATABASE AdventureWorks FROM DISK = [G:\Backups\FULL_AdventureWorks_*.sqb] WITH RECOVERY" '
    - restore multiple transaction log backups
    If you have 10 transaction log backup sets to restore, and the search pattern LOG_AdventureWorks_*.sqb will pick up all files making up the 10 backup sets, you can use something like this to perform the restore, instead of having to restore each backup set individually:
    EXEC master..sqlbackup '-sql "RESTORE LOG AdventureWorks FROM DISK = [G:\Backups\LOG_AdventureWorks_*.sqb] WITH RECOVERY" '
    SQL Backup will pick up all 10 backup sets, sort them in the correct order, group them if the backup set is made up of 2 or more files, and restore each backup set for you.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.