I am trying to set up rsync for OS X 10.8.4 using an exclude file. However, it does not recognize the paths I want to exclude.
I want to copy the user ABC's home directory to a folder called Backup_Mac on a mounted external drive.
rsync -av --progress --exclude-from='/Users/ABC/excludelist.txt' /Users/ABC /Volumes/Backup_Mac
excludelist.txt contains
- /Users/ABC/Dropbox/
It is not excluding the Dropbox folder.
Now if I change the exclude file to
- Dropbox/
it is excluding ABC/Dropbox but also all other folders named Dropbox elsewhere in the file tree. This is not what I want – I want to exclude only the folder ABC/Dropbox but include any other folders called Dropbox, e.g. ABC/Application Support/Dropbox.
Any hint on how to achieve that? How do I have to specify the exclude path, relative to the folder backed up, or relative to root?