Louis-David Mitterrand
2010-Sep-09 13:52 UTC
is a "- *.ext" filter overriden by a later "+ *.ext"
Hi, In our backup script we sometimes would like to override the common (i.e: static) excludes filter list. For example we exclude "- *.ext" for all backups but would like to include "+ *.ext" only for 'local' backups. Are such entries supposed to cancel each other? How can one override an earlier exclude in a filter list? Thanks,
In <20100909135257.GA20432 at apartia.fr>, on 09/09/10 at 03:52 PM, Louis-David Mitterrand <vindex+lists-rsync at apartia.org> said: Hi,>Are such entries supposed to cancel each other? How can one override an >earlier exclude in a filter list?You need to prepend the overrides to your list rather than appending them. In general, rules are processed top down and the first rule that applies stops subsequent rules from being evaluated. I recommend you review the "FILTER RULES" section of the man page. It says <snip> 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 match- ing 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. </snip> Steven -- ---------------------------------------------------------------------- "Steven Levine" <steve53 at earthlink.net> eCS/Warp/DIY etc. www.scoug.com www.ecomstation.com ----------------------------------------------------------------------