I am trying to set up rsync backup for my FreeBSD servers.
I’ve put together an rsync-command that looks like this:
rsync -avzhe ssh --progress --delete --delete-excluded \ --exclude-from=/root/rsync-excludes \ -e ssh / email@example.com:Backups/location
/root/rsync-excludes file looks like this:
- *~ + /root + /usr/home + /usr/srv + /etc + /usr/local/etc + /var/backups + /usr/local/pgsql/backups - /root/.my.cnf - /*
But for some reason, it only backs up /etc and /root, leaving out the other files. Can someone explain why?
As per the answer from Gilles, I figured it out, and my config now looks like this:
- *~ + /etc + /root + /usr/ + /usr/home + /usr/local/ + /usr/local/etc + /usr/local/git + /usr/local/pgsql/ + /usr/local/pgsql/backups - /usr/local/pgsql/* + /usr/local/varnish - /usr/local/* + /usr/srv - /usr/* + /var/ + /var/backups - /var/* - /root/.my.cnf - /*