Using rsync for a backup program but having trouble getting --exclude-from to work properly

Robert Parker rlp1938 at gmail.com
Wed Apr 15 20:19:24 GMT 2009


Reading and re-reading the man page has got me nowhere with this issue
and searching your site on '--exclude-from' got me to the same place.

Here is the script I am using:
####################################

#/bin/bash
suffix=`date +%Y%m%d`
echo Suffix is "$suffix"
fromdir=/home/bob/
echo Source dir is "$fromdir"
todir="$maxtor6"BackupOfHome
excl="$fromdir".dobackup.excl
echo Exclusions file is "$excl"
echo Destination dir is "$todir"
rsync --exclude-from="$excl" -a -b -vv --suffix="$suffix" $fromdir $todir

exit 0
########################

Here is the content of the exclude file

# .dobackup.excl - list of exclusions from rsync backup
/home/bob/.mozilla/firefox/
/home/bob/Ebooks.desktop
/home/bob/Office.desktop
/home/bob/Pictures.desktop
/home/bob/Programs.desktop

The command I use:
./dobackup.sh > list

Partial content of list

Suffix is 20090416
Source dir is /home/bob/
Exclusions file is /home/bob/.dobackup.excl
Destination dir is /media/disk-4/BackupOfHome
sending incremental file list
delta-transmission disabled for local transfer or --whole-file

<snippage>

.xsession-errors
Bookmarks 2009-04-11.json is uptodate
Ebooks.desktop                   # rubbish that I don't want in the backup
Index.pdf is uptodate
Names.pdf is uptodate
Office.desktop                   # rubbish that I don't want in the backup
ParrotSecrets.pdf is uptodate
Pictures.desktop                 # rubbish that I don't want in the backup
Programs.desktop                 # rubbish that I don't want in the backup
Qantas.wmv is uptodate
ThaiAlphabet.ods is uptodate

<snippage>

.mozilla/firefox/                # and I want none of this directory at all
.mozilla/firefox/profiles.ini
.mozilla/firefox/28l3cgx4.default/
.mozilla/firefox/28l3cgx4.default/.parentlock
.mozilla/firefox/28l3cgx4.default/XPC.mfasl
.mozilla/firefox/28l3cgx4.default/XUL.mfasl
.mozilla/firefox/28l3cgx4.default/blocklist.xml
.mozilla/firefox/28l3cgx4.default/bookmarks.html
.mozilla/firefox/28l3cgx4.default/cert8.db

<snipped the rest>

The system I am using is eeebuntu 8.10 on a eeePc 701 if that has any
bearing on anything.

I'm probably just misreading something.

Thanks,
Bob Parker
-- 
In a world without walls who needs Windows (or Gates)? Try Linux instead!


More information about the rsync mailing list