How to delete files older than X on backup during sync?

Thomas von Eyben thomasvoneyben at gmail.com
Sun Nov 9 07:28:54 GMT 2008


Hi list,

I have been reading MAN pages and listarchives, but not found the
answer to my question though I am sure it must be possible to acheive
my wish.

I wish to use rsync to create a backup BUT only keep the files for a
limited period of time, EG two weeks.
I have not yet been able to figure out how to do this inside rsync
(while the backup is being performed) and my understanding of the
"--delete" flag is not for this wish.

My plan is - unless I find out that it indeed is possible with rsync -
to make a cronjob removing files older than X in the folder containing
the backups…

BR,

Thomas von Eyben


More information about the rsync mailing list