Sql-server – Can We Perform an “Up-To-The-Minute Restore” After Taking Transaction Log Backups

restoresql serverssmst-sqltransaction-log

The Setup:

Say we have a Database in Full Recovery Mode that does a nightly Database Backup, Transaction Log Backup, and Transaction Log Shrink.

Now the Transaction Log grows so quickly during the day, so we need to perform a Transaction Log Backup + Transaction Log Shrink every 6 hours to keep it small.

The Question:

Given these sequence of events (specifically the every-six-hours Transaction Log Backup/Shrink), will we still be able to perform an "Up-to-the-Minute" Restore? (That is, using the last DB Backup + Transaction Log to get the most recent data).

Best Answer

Shrinking your transaction log should not be part of your routine. A transaction log backup clears the log file automatically; shrinking it afterward just causes it to have to grow again afterward. Read this for more information.

Yes, you should be able to perform point-in-time restores using your latest full backup and any subsequent transaction log backups. Anything more recent than the latest transaction log backup will require that the server still be operational enough to take a tail-log backup

The critical point is to test it. Backups are not reliable until you know from experience that you can restore the data successfully. This article and the links at the bottom of that article have some good information about SQL backup strategies.