rsync very selectively



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@server:/home/jf/DesktopHomeBackup

and the BackupIncludes file contains
scripts/
.bash*


Can anybody help with this please?

Dave



--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • rsync and bash
    ... I have a bash script that does an rsync with a remote ... If I log on to the remote machine, ... For other reasons I prefer a bash shell there also, ...
    (comp.unix.solaris)
  • example rsync script that links to new versions
    ... Here is a script that will rsync directories from 1 node to another, ... # excludes file - Contains wildcard patterns of files to exclude. ... # if the pattern ends with a / then it will only match a directory, ...
    (comp.unix.shell)
  • rsync exclude file - directory name without directory contents
    ... When using rsync to maintain incremental backups significant space can be ... files, and caches. ... EXCLUDE PATTERNS. ... I use a separate backup server and pull from LAN clients but any model ...
    (alt.os.linux)
  • rsync exclude file - directory name without directory contents
    ... When using rsync to maintain incremental backups significant space can be ... files, and caches. ... EXCLUDE PATTERNS. ... I use a separate backup server and pull from LAN clients but any model ...
    (comp.unix.admin)
  • rsync exclude file - directory name without directory contents
    ... When using rsync to maintain incremental backups significant space can be ... files, and caches. ... EXCLUDE PATTERNS. ... I use a separate backup server and pull from LAN clients but any model ...
    (comp.os.linux.misc)