On Sun, Feb 27, 2005 at 04:31:15AM -0500, Eli wrote:
> 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

You probably neglected to add an --include='*/' to include all
directories on the way down to the files.  I.e.:

rsync -av --include='*/' --include-from=files_from_file --exclude='*' \
  --delete /src/ /dest/

That works as long as all the files in the "files_from_file" are
relative to the same "/src/" path.  It also forces rsync to recurse
through all the directories, which makes it run a little slower.

Another potential solution is to generate the list of deleted files on
the system as you generate the file-from list, and then use a command
like this to delete them:

    ssh -l remote_user remote_host xargs rm </local/delete_list

That assumes that you have remote-shell access.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to