DO NOT REPLY [Bug 7889] New: Add "--backup-deleted"

samba-bugs at samba-bugs at
Sun Dec 26 15:53:43 MST 2010

           Summary: Add "--backup-deleted"
           Product: rsync
           Version: 3.0.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: jik at
         QAContact: rsync-qa at

I am using rsync in a way where I very much want deleted destination files to
be backed up, but I very much do not want modified destination files to be
backed up. In particular, I want to "shred" deleted files, and the easiest way
to do that is to give them a backup prefix and then go through all the files
with that prefix after rsync is done and shred them. The reason why it is
important for me to only back up deleted files is because I am doing rsync to
an s3backer filesystem, and my upload bandwidth is low, so if I back up
modified files in addition to deleted ones, then rsync has to write a lot more
data to the s3backer filesystem, which make the backup run much more slowly and
also costs me more money in s3backer usage fees. The fact that I am using
s3backer is also why I want to shred (with -z) the deleted files, because if I
overwrite them with nulls, the relevant blocks will be deleted on the s3backer
filesystem, thus saving me money in s3backer usage fees.

I added a new flag to rsync to do what I need: --backup-deleted, which backs up
deleted files without backing up modified ones. I think this functionality is
generally useful enough that it is worth incorporating into the official rsync

Please note: this introduces a protocol incompatibility, which I have NOT dealt
with in my patch, because I don't understand the ins and outs of how this works
and I'm pretty sure the rsync maintainers will be able to figure this part out
a lot faster and more correctly then I can.

I am attaching to this bug report my patch for adding --backup-deleted support.
Thank you for considering my patch.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list