include and exclude file
Marc Collin
redfox26 at videotron.ca
Sat Apr 15 01:38:35 GMT 2006
hi
i try to include and exclude file when i do a rsync
#!/bin/sh
# directory to backup
BDIR=/home/collinm/test/home
# includes file - this contains a wildcard pattern per line of files to
exclude
INCLUDE=include.txt
# excludes file - this contains a wildcard pattern per line of files to
exclude
EXCLUDE=exclude.txt
OPTS="-a -r -v -p -t --delete-before --exclude-from=$EXCLUDE
--include-from=$INCLUDE"
# the name of the backup machine
BACKUPDIR=/home/collinm/test/back
# now the actual transfer
rsync $OPTS $BDIR $BACKUPDIR
script work fine
my exclude.txt file contain:
rpm/
mp3/
Download/
.*
my include.txt file contain:
.kde/
rsync don't copy my kde folder....
i don't want to list every .* file i have..... there are to many....
any idea?
thanks
More information about the rsync
mailing list