How do I make sure locally deleted files have been rotated before deleting them on the server, whithout breaking incremental rsyncing?
I usually rsync my files into /backup/active/
on my server, which should always contain the latest mirror, and should reflect what's on the client to 100%. This entire folder will be rotated nightly to /backup/cold/
using ddar
and online using tarsnap. I want to make sure that every snapshot that is rotated contains only the files that were actually on the clients at the time. How can I make sure that files that are deleted on the client also gets deleted in the backup, without breaking rsync or accidentally deleting non-rotated files?
I don't want to use rsync --remove
because that might remove files that haven't been rotated and backed up yet. Nor can I just shift the entire /backup/
folder a rotation, because I need to keep rsync's incremental functions.
--link-dest
) to maintain a hierarchy of backups.