Using --files-from but also having rsync delete...

Eli eli-list at
Sun Feb 27 09:31:15 GMT 2005

I am using rsync with --files-from to specify an exclusive list of files for
rsync to back up to an rsync server.  I give rsync the list using find to
spit out a list of files that are 2 or more days old from a list of files
that can change.  The backup of the files works perfectly, however I
realized that once the files are stored on the backup server, I have no way
of informing rsync the next time around if there are files it should
*delete* from the rsync server, as I want the rsync server to contain only
the files & folders that the source system has, and nothing more (ie, like
you would using --delete).

I thought I could use --include-from and then add --exclude='*' to see if
rsync would backup what I needed and then delete anything not in my list
from the rsync server side, however it did not, not to mention coming up
quite short in the list of files it should have backed up (only backed up
about 10% of the files I told it to).

After messing with options for about 4-5 hours, I seem to have only 2
useable options:

1) wipe out all files from the rsync server prior to doing my backup to
ensure the rsync server has only the current files, and no files that no
longer exist on the source system

2) request a wishlist feature which allows rsync on the source system to
tell the rsync server to delete all files NOT in the --files-from list.

#2 is preferrable, and I was hoping something like that already existed,
however I was unable to get anything to work for me that would do this.

Does anyone have any suggestions for things maybe I haven't thought of?
Failing that, is my wishlist item feasable?  If so would someone here be
willing to implement it for me (and how soon could that be done)?


More information about the rsync mailing list