Re: differential/incremental /var/log backups
On Thu, Jul 24, 2003 at 12:08:15PM +0200, Marcin Owsiany wrote:
> So far I can think of two solutions, but I like neither:
> - backing up WHOLE /var/log every day (level 0 each time) - this means
> larger backups
> - changing traditional rotation (file.number.gz) to something like
> file.year-month-day.gz - this means changing all rotation cronjobs
> or patching logrotate
Yes, I also don't like the default scheme of logrotate filenames.
Specifically I have archives of Apache logs, and in that case having
the starting date in the filename is very helpful. It also makes
sorting of filenames in hierarchical order a very easy task,
for shell scripts for example.
What I did is just a set of simple scripts, which work on top of
existing logrotate architecture. They take files like
access.log.[0-9]+.gz and rename them to access.YYYYMMDD.gz
(the date is calculated from the first line in a particular Apache
logfile). That's a very simple solution and it works for me.
I also tried cronolog, which gives a flexible logging options for
Apache, and it was very good too.
Maybe such a functionality also exists in syslog-ng or some other
syslogd replacements? You wouldn't need logrotate at all if syslogd
was smart enough to automatically switch logs and give them appropriate
names.
Marcin
Reply to: