dir-merge in a subdirectory
matt at mattmccutchen.net
Tue Aug 5 20:10:55 GMT 2008
On Tue, 2008-08-05 at 15:26 +0100, Eduardo Suárez wrote:
> Is it possible to add a rule like
> dir-merge myconf/mybackuprules
> That is, the file to merge is in a subdirectory of directory where we
> want the rules to apply.
Rsync doesn't currently support that, but it would be a very reasonable
addition. After the change, a dir-merge path beginning with / or ../
would request a scan of parent directories, while any other dir-merge
path would be saved as-is and followed from each directory to obtain
rules for that directory.
It looks like the place to implement this is in parse_merge_name in
exclude.c. Simply changing the "if (fn != buf)" to also test for an
initial "../" makes the "dir-merge myconf/mybackuprules" example work.
However, parse_merge_name is called in three places, and the change
might break other uses.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080805/2b90df68/attachment.bin
More information about the rsync