Hi.
On Tue, 23 Apr 2019 16:35:15 +0200 MI via rsync wrote:

> If someone has a good suggestion on how to rsync a list of files and 
> delete from the destination any file that is not listed in --files-from, 
> that would be welcome.

Assuming you are talking about files in a same source directory, you
can do:

   - generate a file (KEEP_FILE) with the list of files you want
   - call: rsync ... --include-from KEEP_FILE \
             --delete --delete-excluded \
             SOURCE_DIR/ DESTINATION_DIR

KEEP_FILE should have the format:

+ /keep1/***
+ /keep2/***
...
- *

leading / to match only at the first level

/*** to match any level of sub-directory (if keep1 ... are
directories)

-- 
Francis

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
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