Hi,
I'm using rsync to keep several file servers in sync. Uploads to the
data can be placed at any time on any server. I'm using the extended
N-way backup, following the example from the two way backup in the FAQ:
rsync --archive --update rsync::first/files files (on second, third)
rsync --archive --update rsync::second/files files (on first, third)
rsync --archive --update rsync::third/files files (on first, second)
I'm looking for a way to "phase out" old files (>60 days).
Currently,
I'm running 'find files -mtime +60 | xargs rm -f' after each rsync,
to
remove the oldest files from the local server. This approach is working
OK when all the servers run the cleanup job at the same time.
However, with large number of files, the rsync/find are happend on
different time on different servers. As a result, old files are being
removed by the cleanup job, are getting restored by on the next rsync
from other servers that are still processing the previous rsync/cleanup
job. The file can get "ping-pong"ed for several times, until it get
removed from all servers at the same time.
Does anyone has any idea if it's possible to add "exclude-old
<days>" to
'rsync' - which will instruct rsync to exclude files older than a
specific date ?
Thanks
Yair Lenga