November 20, 2011 at 9:17 am
Dear All,
I have implemented the Log shipping manually on my servers & the same is running without any error.
I have a question related to LOG backup files & backup history i.e. after how many days or hours we can remove the LOG backup files (OLD ones) those are generated for copying data from Primary to Secondary server AND Backup & related history by executing "sp_delete_backuphistory" store procedure.
If we do the same then is there any reverse effect on Log Shipping process?
Also tell me the precautions / guideline those are to be taken in Log Shipping whether on Server or on DB level?
Kindly guide me.
Thanks
November 20, 2011 at 10:07 am
keep enough backups so that if the copy jobs fail the logs are still on the primary to be copied without breaking the log chain. In most cases this means 2-3 days to cover a weekend. It is also dependant on the amount of disk space you have available.
deleting backup history will not affect logshipping, but why be severe with this? Keep a few months worth, its useful for tracking database growth
---------------------------------------------------------------------
November 21, 2011 at 11:50 am
I would keep 4 or 5 days worth of backups, upcoming Thanksgiving holidays, case for 5 days worth.
Technically, after it is copied to the secondary location it is no longer needed on the primary server. You could write a sp to do a directory comparison between the 2 directories where the log backup files are, and delete all of the backups that have been copied to the secondary db. There are reasons that you might not want to do this though.
I zip and ship my log files, and ran into problems with a copied zip file last week. Log shipping could not restore the log backup. I finally copied the zipped log file over again, unzipped it, and the restore was successful. If I had deleted my zip file I would have had to redo log shipping, which is not an easy task because of locations involved....
John.
November 28, 2011 at 9:32 pm
It basically depends on your log backups size & the amount of space you have.
1. You can get the information about the log backup files which have been restored successfully on Secondary servers in MSDB.
2. Once you get this information you can go ahead to delete those files from Primary server.
**Don't delete those files which have been copied but not yet restored on secondary so that you can copy those files again if your previous copied backup gets corrupted during transportation over network.
Otherwise if you don't wish to follow above given approach & if you have enough space that you can store atleast 3 days log backup then go for it.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply