laziness, impatience, and hubris | |
PerlMonks |
Re^3: [OT]Is there any module can rotate log file?by RMGir (Prior) |
on Oct 14, 2008 at 09:32 UTC ( [id://716927]=note: print w/replies, xml ) | Need Help?? |
It depends. You haven't provided enough information.
I assume the logfile rotation would be happening on the system being rsync'd FROM. You'll have to check how rsync does its directory comparison, but I think it does it once at the start of the sync. So if the rotation happens after that point, but before the copies are complete, then your latest log slice might be missed by the rsync. But it's not "lost" -- it's just not rsync'd. All you have to do is set up the Rotate's to happen every n minutes (60, 120, whatever...), and rsync in the middle of those intervals. In that case, unless you've accumulated more data in n/2 minutes than rsync can move, rsync isn't going to conflict with the rotation... Mike
In Section
Seekers of Perl Wisdom
|
|