[Bug 14371] New: Combined Exclude & Protect Filter Type
samba-bugs at samba.org
samba-bugs at samba.org
Wed May 6 17:05:13 UTC 2020
https://bugzilla.samba.org/show_bug.cgi?id=14371
Bug ID: 14371
Summary: Combined Exclude & Protect Filter Type
Product: rsync
Version: 3.2.0
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: core
Assignee: wayne at opencoder.net
Reporter: samba at haravikk.com
QA Contact: rsync-qa at samba.org
This proposal is for a new filter rule that combines an exclude and a protect
rule into a single line.
REASONING
When using rsync to perform backups, it can be possible to optimise performance
by identifying in advance on the sending side any directories that haven't
changed. For example, when rsync'ing from a macOS Time Machine backup, if you
can compare against a previous backup you've already rsync'd across then it's a
simple case of checking directory inodes, any directory whose inode matches the
same directory in the previous backup is completely unchanged, and so can be
skipped completely by rsync (no need to check it or its contents).
To do this, I generate a filter list with lines that look like the following:
- /path/to/unchanged/directory/
P /path/to/unchanged/directory/
- /path/to/another/unchanged/directory/
P /path/to/another/unchanged/directory/
This tells rsync to exclude the unchanged directories, but to not exclude them
(when --delete-excluded is present, as it should be when taking backup
snapshots).
Now this works great, the "problem" is that it requires two lines per entry to
do what is a very useful trick, so what I would like to see is the addition of
a combined option to do this. For example S for skip, so that I can do in a
single line what I'm currently doing in two (resulting in a filter list that's
twice the size it needs to be).
Alternatively, this could be added as an option for either the exclude or
protect rule. So the possible syntaxes would be:
S /foo/bar/baz Skip /foo/bar/baz
-,P /foo/bar/baz Exclude /foo/bar/baz and protect from deletion
P,S /foo/bar/baz Protect /foo/bar/baz from deletion and skip
checking it
I prefer the first as it feels enough like a distinct operation to potentially
warrant its own rule, but I'd be fine with either of the others. -,P is perhaps
the most logical (allows the P rule as part of an exclude rule)?
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list