I'm using rsync on an Ubuntu 12.04 LTS server with the following script to back up all of /
, however, whenever I run the script (as root), the directory /backup
is included, when it should be excluded:
#!/bin/sh
rsync --password-file=/etc/rsyncd.password --delete -aAXzv --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs,/home/*/Downloads/*,/backup/*,/var/spool/squid3,/opt/atlassian,var/www/\~*} /* fsbak@servername::fsbak
Why is this happening, and how can I make rsync ignore /backup
?