restore to point in time between LOG and FULL backup
jchertudi
Posts: 13 Bronze 2
We schedule our Log backups to run each weeknight at 6pm, then run a full backup at 2am on Sunday. Possible to then restore to 1pm on Saturday, which falls between the LOG and FULL backup?
If not, how could I plan backups to have FULL done weekly but also have LOG backups for any point in time?
If not, how could I plan backups to have FULL done weekly but also have LOG backups for any point in time?
Comments
You need to create a better backup strategy. If your database is very large then you can take differential backups during the week. If you have vert little in the way of updates then taking more log backups will not hurt as they would be small and take little time.
Chris
I was hoping you might offer some ideas relative to the window between a TLOG backup and a FULL backup. There must be some way to full backup without losing those transactions.
Again I ask why so few backups if you are expecting to restore to a point in time? Even though you may have many small DB's you run the risk of losing many hours/days of data if something goes wrong. Are you prepared for that? Also if you have some large updates then your logs are probably sized much larger than they need to be as you are rarely offloading them. If you are on SQL2005 and beyond only a log backup will offload the committed transactions. Sounds like you should have tuned in to Paul Randals backup discussion on PASS 2 days ago.
Our scheme is a full backup every day and hourly log backups and alerts to fire a log backup if the log gets fuller than 65% before the scheduled log backup runs.
Chris
Still back to original question... there is no method to restore to a point in time between a Log and Full Backup, correct? I already started doing a log backup right ahead of our weekend full backup.
Yes, restore the last full backup for the previous Sunday, then all log backups made after that from Monday to Friday, and finally restore the log backup made on the following Monday with the STOPAT option.
A full backup does not break the transaction log restore chain. See http://www.sqlbackuprestore.com/trxlogrestoresequence.htm for details.
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Also, the SQB UI doesn't seem to support such a restore, when I select a transaction log, it only selects files back to the prior Full backup. Do these sort of restores need to be run via SSMS??
Could you also please post the LSN's of the previous Friday's transaction log backup, Sunday's full backup, and that Monday's transaction log backup? You can do this using the RESTORE SQBHEADERONLY command e.g.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Yes, you need to do this in scripts, not via UI
Restore last sunday's FULL backup, in NONRECOVERY mode
Restore all remaining LOG backups, all in NONRECOVERY as well
Monday, Tuesday, Wed, Thurs, Friday
then restore Saturday's LOG backup
RESTORE FROM DISK = '....' WITH STOPAT = 'Saturday 1 pm'
DBA, MCITP
If you have individual log backup jobs rather than one that backs up all your database transaction logs at the same time, you might want to add percent log full alerts to fire off extra log backups. If you have just the one job then you might want to run it more aften than once a day for recovery benefits as well as database size savings. If you have large logs you could have lots of VLF's (variable log fragments) that hinder recovery.
Chris