1
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.
Maybe you should consider using rsync linking capabilities (
--link-dest
) to maintain a hierarchy of backups. – Der Hochstapler – 2014-01-13T12:12:19.503I want to keep things simple to avoid mistakes, and hard links are one of the things I'm not yet comfortable enough using that I want to risk my backups. – Arkenklo – 2014-01-13T12:24:44.797