[Dirvish] Confusion about excluding and including
paul at debian.org
Fri Apr 19 09:41:26 UTC 2019
On Fri 19 Apr 2019, Vortex wrote:
> In the temporary file "exclude" and in the summary file after the
> backup, the exclude list is this:
> - lost+found/
> - .cache/
> - .gvfs/
> - temp/
> - /media/*
> - /run/*
> - /sys/*
> - /tmp/*
> - /proc/*
> + /media
> + /media/*
> - some_dir_in_home/*
> - another_dir_in_home/*
> The lines from lost+found to /proc are from the master.conf, the four
> last lines are from the dirvish.conf.
The problem is that rsync uses the first match; from the FILTER RULES
paragraph in the manpage:
As the list of files/directories to transfer is built, rsync checks
each name to be transferred against the list of include/exclude
patterns in turn, and the first matching pattern is acted on: if it
is an exclude pattern, then that file is skipped; if it is an
include pattern then that filename is not skipped; if no matching
pattern is found, then the filename is not skipped.
Note the "the first matching pattern is acted on"...
So what you want is impossible, you will have to exclude the /media/* in
every other config and remove it from the master.conf.
More information about the Dirvish