[Glass] Purge tranlogs?

Norbert Hartl norbert at hartl.name
Fri Dec 20 14:09:33 PST 2013


Am 20.12.2013 um 22:40 schrieb James Foster <james.foster at gemtalksystems.com>:

>>> I wonder the side effects of removing the obsolete translogs. I guess not that much but I am not 100% clear of what that means exactly. Need to read more about it. 
>>> 
>> I talked to James in Edinburgh about this and the conclusion is that there is a chance this goes wrong but the odds are very low. If you want to be save I think you need to do an explicit snapshot before invoking the script. James can tell it how it is exactly.
>> 
>> Norbert
> 
> The basic idea is that to do a full restore to the current point you need all the tranlogs that go with whatever backup you have to start the restore. A typical model is to do daily backups and keep two backups and the tranlogs starting from the earlier backup. Beyond that I tend to keep a weekly backup for a month, monthly backups for a quarter, quarterly backups for a year, and then yearly backups. You can’t restore to the current point with these (since you wouldn’t have the tranlogs), but it is occasionally interesting to go back and see something.
> 
> See the System Admin Guide (http://downloads.gemtalksystems.com/docs/GemStone64/3.1.x/GS64-SysAdminGuide-3.1.pdf) and http://www.youtube.com/watch?v=RTRQhUQqCcc.
> 
Now I remember. That was the point making the script point to the backup instead of the extent. My script is

#!/bin/sh

for stone in $STONE_LIST; 
do 
   date >> /opt/application/$stone/log/cleanup-tranlogs.log
   /opt/stone-creator/bin/delete-old-tranlogs.sh -g /opt/gemstone/product -d /opt/application/$stone/data -f /opt/application/$stone/backup/backup.dbf.gz -r >> /opt/application/$stone/log/cleanup-tranlogs.log 2>&1
done

and I do a full backup a few minutes before that script runs. So if all of the redundant hardware dies I loose a maximum of 24 hours of data but still be consistent. 

Norbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131220/93415969/attachment.html>


More information about the Glass mailing list