2

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.

Scott Pack
  • 14,907
  • 10
  • 53
  • 83
David
  • 841
  • 3
  • 14
  • 31

1 Answers1

5

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

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81