----- Original Message ----- From: "Nate Aune" <nate@lld.dk> To: <zope@zope.org> Sent: Wednesday, April 21, 2004 5:54 AM Subject: [Zope] Re: Zope & logrotate
Hi Paul,
As with most Zope sites, we are using Apache in front of Zope and therefore using Apache's logging facilities instead of the Z2.log file creating by Zope.
We are now trying to build a backup script to backup our Zope products/data/logs and would like to know how to backup the log files without losing any data.
We are using rdiff-backup and it doesn't like it if the file changes while it's doing the backup. This is why we are packing the database before each backup and backing up the Data.fs.old file instead of the live Data.fs file.
But we would not like to rotate the log files daily just to get a file that we can backup. We'd prefer to rotate the log files monthly, but do daily backups.
Couldn't you write a cron job that will duplicate (or append to new file) the file prior to backing up and backup that file? I'm also thinking (outloud) that rotating the log at midnight daily would close the old version, and then the only backup you wouldn't have would be the open file from the rotate time to the backup time, which would be backed up the next day. Maybe i'm not getting the problem. hth bobb
Is there a 'best practice' way of handling the backups of these Apache log files? We've had a look at the AWStats FAQ-COM120 ("How to rotate my logs without loosing data"), but this still doesn't explain the issue of backing up the log files without doing daily rotations.
Nate
Paul Winkler wrote:
On Sun, Feb 29, 2004 at 07:03:31PM +0000, John Poltorak wrote:
How I go about archiving Zope's log every day?
Can I get logrotate to process the log file?
Sure you can, I do it every night with a cron job.
The only thing to be careful of is that you want a postrotate script that tells zope to reopen the log file. See doc/SIGNALS.txt to learn how to tell zope that, and the logrotate man page to learn how about postrotate.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )