[Wiltshire] rsync very selectively
David Fletcher
dave at thefletchers.net
Mon Jun 11 15:45:36 UTC 2012
Tried asking this question on the Ubuntu list on Friday but so far no
replies :-(
I want to use rsync to copy a very small selection of files from a
desktop to a server. rsync works OK for me except to do this. I want to
firstly exclude everything, then use an include file for the bits I do
want.
I found out from the usual google search how to exclude everything.
I can get the include file to copy .bash* but no matter what I try I
can't persuade it to recursively do directories, in this case the
scripts directory for starters. I've tried it with -r, --recursive,
--dirs, with a training /, without a trailing /, trailing /* ......
nothing works for me and I can't find a how-to.
So, in desperation I'm asking for help!
The command I'm running from inside a script as user jf is
rsync -av --recursive --include-from=/home/jf/scripts/BackupIncludes
--delete-excluded --exclude='*' --bwlimit=3000 /home/jf/
jf at server:/home/jf/DesktopHomeBackup
and the BackupIncludes file contains
scripts/
.bash*
Can anybody help with this please?
Dave
More information about the Wiltshire
mailing list