On my servers I have log rotation and a backup script which, besides all, backs up the entire log directory.
For log rotation I use logroatate on Linux and newsyslog is used on BSD. For log backup I simply
cp -Rf /var/log/ /backups/
From time to time the backup script fails because of a race condition occurring when log rotation renames a log file during the backup is running. So I get something like:
cp: /var/log/messages.0: No such file or directory
I believe my situation is not unique. Are there any best practices to overcome this race condition and make backup more reliable?