[plug] Rsync script
Nigel Duff
nigel at dubh.id.au
Wed Mar 25 17:04:12 WST 2009
I have the following bash script to rsync my home dir to another
drive. It copies the files ok, but ignores the "--exclude-from="
directive.
What obvious thing am I missing?
-----------------------------------------------------
#!/bin/bash
SOURCE="/home/nigel/"
DEST="/Storage1/Backups/liath/"
RULES="/home/nigel/.rsync_rules"
B1_Opts="-azmhxsvv --delete --delete-during --timeout=180"
rsync $B1_Opts --exclude-from=$RULES $SOURCE $DEST
-----------------------------------------------------
And my .rsync_rules file looks like this;
-----------------------------------------------------
-/home/nigel/e17_src
-/home/nigel/Incoming
-/home/nigel/.cache
-/home/nigel/.mozilla/firefox/9x8e7slg.default/Cache
-/home/nigel/.opera/cache4
-/home/nigel/.opera/opcache/
-RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state
.nse_depinfo *~ #* .#* ,* _$* *$ *.rej .del-* *.a *.olb *.o *.obj
core .svn/ .git/ .bzr/
-------------------------------------------------------------------
Yes that last exclude is all on the same line. I originally had a
space between the - and / but that didn't make any difference.
Thanks,
Nigel
More information about the plug
mailing list