I am using rsync to backup some files from /home/joe/ to a flash drive: /linux/media/joe/
rsync is copying some files over that I don't want. I am hoping someone can look at my backup script and filter file and show me what I am doing wrong. I have researched a lot about this program, but am apparantly missing something.
This is my backup script:
Quote:
#!/bin/bash
# Flash backup script
#The source directory:
SRC="/home/joe/"
#The target directory:
TRG="/media/linux/joe/"
#The rsync options:
OPT="-av --numeric-ids --delete --delete-excluded --filter=merge_/home/joe/bin/scripts/filter-rule-flash.txt"
#Execute the backup
rsync $OPT $SRC $TRG
|
This is the filter-rule file:
Quote:
- /downloads/
- /audacity/
- /videos/
- /.cache/
- /.gvfs/
|
The script still copies /video over but I din't see .cache/ or .gvfs/ but I stopped after it started copying video files.
I don't know what could be the problem except maybe the quotes in the OPT variable in the script
Thanks for help