0
I am using rsnapshot and I want to exclude a directory by absolute path.
I added to rsnapshot.conf exclude /home/user/data
rsnapshot will use this rsync command:
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
--exclude=/home/user/data /home \
/backupdir/hourly.0/localhost/
and it works, it excludes the /home/user/data
dir but it's not clear to me why it works.
Reading the man pages of rsync (and for example this answer https://askubuntu.com/a/349625) exclude/include patterns that start with / are are anchored to the root of transfer, so I was thinking it will fail because it try to exclude
/home/home/user/data
Can someone clarify me this point?
What is the right way to exclude a directory using absolute path?
Thanks for the help