rsync --exclude directory not working

Status
Not open for further replies.

pos69sum

Registered
I've installed rsync and am trying to back up my home folder to a USB hard drive.

My backup script looks like

Code:
#!/bin/bash
sudo /usr/bin/rsync -av --progress --delete --exclude-from /Users/rjm/.rsync/exclude --log-file=/Users/rjm/rsync/$(date +%Y%m%d)_rsync.log /Users/rjm/ /Volumes/MYBOOK500GB/backups/

My 'exclude' file looks like

Code:
/Users/rjm/Movies/

I basically want to back up my home folder except the Movies/ directory. When I run the script, it's still backing up Movies/*. I've tried variations of 'rsync --exclude' like

Code:
--exclude "/Users/rjm/Movies/"
--exclude="/Users/rjm/Movies/"
--exclude-from="/Users/rjm/.rsync/exclude"

none seem to work, Movies/ is backed up every time.

Any advice? Thanks.
 
Status
Not open for further replies.
Top