What's wrong with my exclude rules?
Danny Sauer
rsync at danny.teleologic.net
Wed Feb 23 18:08:28 GMT 2005
So, given this (broken up for email - it's all one line in the
script):
/usr/bin/rsync -q -a -e ssh -H --delete --delete-excluded
--ignore-errors --include "/" --exclude "/proc/*"
--exclude "/proc/bus/usb/*" --include "/boot/*"
--exclude "/dev/pts/*" --exclude "/dev/shm/*"
--exclude '/tmp/*' --exclude '/var/tmp/*'
--exclude '/usr/tmp/*' --exclude '/var/cache/*'
--exclude '*~'
root at router:/ /mnt/backup/router
Why do I have this:
gutenberg backup # ls -l /mnt/backup/router/proc | head -n 10
total 140634
dr-xr-xr-x 3 root root 336 Feb 23 11:18 1
dr-xr-xr-x 3 root root 312 Feb 23 11:18 10
dr-xr-xr-x 3 501 501 336 Feb 23 11:18 1059
dr-xr-xr-x 3 root root 312 Feb 23 11:18 11
dr-xr-xr-x 3 postfix postfix 336 Feb 23 11:18 1448
dr-xr-xr-x 3 root root 312 Feb 23 11:18 15
dr-xr-xr-x 3 root root 336 Feb 23 11:18 1607
dr-xr-xr-x 3 root root 336 Feb 23 11:18 1609
dr-xr-xr-x 3 root root 312 Feb 23 11:18 2
I've clearly listed --exclude "/proc/*" and --delete-excluded, but
there's still stuff in /proc. I've tried --exclude="/proc" and
--exclude "/proc/" - but friggin' /proc is getting copied every time.
None of the other excludes seem to be followed either - which is a
royal pain. Is it the order (or the --include /)? What's the
precedence of --include and --exclude?
Also, could the man pages maybe be updated so that they're consistent
with the use of '=' after --exclude and --exclude-from, or maybe note
whether the '=' is required or optional? :)
Thanks.
--Danny
More information about the rsync
mailing list