Robin Ericsson wrote:
Hi,
I'm trying to pull the trick found on the wiki on how to use multiple
directories per vault. My default.conf looks like this. And yes, /var
is on the same drive as etc and root.
"""
client: [EMAIL PROTECTED]
tree: /
xdev: 0
index: bzip2
log: bzip2
exclude:
+ /etc
+ /root
+ /var/log/x/
/*/
/*
"""
The funny thing is that /etc and /root works, but now the /var/log/x,
it doesn't matter if I put it before etc or root, it still doesn't
take it.
Any ideas how I should debug this further as I guess it's rsync to
"blame"? Or am I lost here? Should I really have to create multiple
vaults just for this "easy" backup?
The reason your exclude settings don't work is that rsync works
recursively, so it doesn't even check /var/log/x/ because all of /var is
excluded. This is explained pretty well in the rsync man page, in the
"INCLUDE/EXCLUDE PATTERN RULES" section (right after the detailed
explanation of all the options). As far as I remember, you need to
include /var, include /var/log, include /var/log/x, exclude everything
else in /var/log/, and exclude everything else in /var/. This way, rsync
will get to /var/log/x/, but will exclude everything else in /var and in
/var/log, which is probably what you want. So your exclude section would
look something like this:
+ /etc
+ /root
+ /var
+ /var/log
+ /var/log/x
- /var/log/
- /var/
- /*
The dashes aren't necessary, I added them for clarification. I'm not
sure about the slashes, as I no longer have any conf files with such a
setup, and I'm just going from memory. Make sure to read the relevant
parts of the rsync man page, and then experiment with different settings.
Hope this helps,
Yoav Klein
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish