Reduce your backup churn
by Andrew Macpherson on Dec.03, 2010, under Operations
Since forever the conventional way of dealing with ever growing log files has been to move the old file aside into an ‘n’ deep push-down stack, so that for logfile ‘log’ the most recent backup will be ‘log.1,’ the next older ‘log.2′ and so on. It’s a simple scheme and makes it easy to identify the more recent files.
The disadvantage is that every time the logfiles rotate all the files in that stack change, and need to be backed up.
It’s possible to massively reduce this storage churn by arranging to not use the numeric sequence, but rather datestamp the archive files. The standard utility used for this logrotate has the facility built in. just add 2 lines to your global configuration file:
- ‘dateext’
- ‘notifempty’
Now why is that not the default?
December 17th, 2010 on 04:56
nice post. thanks.