How does v6.4 restore LATEST_ALL log backup files?

jerryhungjerryhung Posts: 138
edited March 18, 2010 9:13PM in SQL Backup Previous Versions
My question is

Does it restore
- only the log backup files AFTER the latest_diff file? (either by LSN, or by file timestamp?)

or restores ALL LOG*.sqb file in the directory?

e.g.
SUNDAY = FULL backup
MONDAY - FRIDAY = DIFF backup, say 5 am
HOURLY = LOG backup, say every :30

If I want to recover to Wednesday 7:30 am with LATEST_FULL

SQL Backup will restore
- Sunday FULL
- Wednesday 5 am DIFF
- all the log after 5 am? namely 5:30, 6:30, 7:30


from the Help file
You can also use the SQL Backup command line or extended stored procedure to restore a database using all the latest backups for a particular database (including the latest full backup, a subsequent differential backup, and all available transaction log backups). Use the RESTORE command with the LATEST_ALL keyword. For example:
SQLBackupC -SQL "RESTORE DATABASE Sales_Prod FROM DISK = 'C:\Backups\Sales*.sqb' LATEST_ALL WITH RECOVERY "

will restore the latest full backup of the Sales_Prod database, followed by the most recent differential backup, and then finally the most recent transaction log backups.
Jerry Hung
DBA, MCITP

Comments

  • peteypetey Posts: 2,358 New member
    RESTORE_ALL will use differential backups where available, and restore only transaction log backups made after the differential backup.

    Thanks.
    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.