Hey all,
Thanks for previous replies regarding Always On.
I have some backup questions or maybe it’s just clarification and getting my head around log backups.
Trying to set up a maintenance plan and automate it.
I am looking at a full database backup at night and then probably 4 log backups, one every 6 hours.
Here is where I am a bit fuzzy when it comes to log backups.
Let’s say I get a full backup at 12:00 am and at 6:00 am a log backup kicks off. Then another log backup 6 hours later at 12:00 pm, another at 6:00 pm.
The system crashes at 7:05 pm, an hour and 5 minutes after the last log backup.
I restore the full backup from 12:00 am then restore the log backups from 6:00 am, 12:00 pm and then the final one at 6:00 pm.
In all I have lost one hour and five minutes of data, from the log backup at 6:00 pm to 7:05 pm when the crash occurred.
I have to restore all the log backups, in order as they are ‘cumulative’,
Let me stop at this point and ask is everything I have explained so far, in regards to backups and restores correct?
Now I’ll move on to my confusion of truncate.
When you truncate the transaction log, it is not necessarily going to shrink the size of the log (in file size) but instead is going to ‘mark’ the transactions committed to the .mdf file as committed and so they can be overwritten?
Is this correct?
If you do a full backup, followed by a log backup and you mark it “Truncate the Transaction Log” in Media options then it will do what I just explained essentially
‘clearing the log’.
Again, is this correct?
So finally to the question I am getting at;
If I right click on a database and select task and backup and select Log Backup then the Truncate the Transaction Log radio button is selected and cannot be un-selected.
I do NOT want the transaction log backups taken at the 6-hour intervals described above to be truncated because
if I do, it basically makes the transaction log useless in a restore where all the transaction log backups done in the previous 6-hour increments cannot be restored ‘in order’.
Any and all help and clarification will be much appreciated.
R. Brown