I have the following rsync command:

0 0  * * *  rsync -av --delete /media/VIDEOS/ /media/lacie1/backup/videos/

I want to set it so instead of doing a replication like what it's doing now, it does a normal backup and only deletes file from the destination only after they haven't been found on the source for X days (like 7 days). This is to give a larger window of recovery if files go missing, but without keeping loads of duplicate files as the files being backed up get moved around a lot.


I wouldn't reinvent the wheel; for example rdiff-backup is rsync based and can do what you need, among many other things.

  • brilliant stuff! – David Jul 28 '11 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.