rsync command for multi files and dirs from remote server

Noah noah-list at enabled.com
Mon Sep 19 12:08:54 MDT 2011


>
> 1. don't need the '-e' option ('ssh' is the default, and the options
> will come from ~/.ssh/config)
> 2. can use the Host specified above to shorten the source
> 3. don't need the redundant '-r' and '--perms' (-a includes both)
>
> /usr/bin/rsync -avz --human-readable --progress --update
> --ignore-existing --delete --relative rsync-reverse:/etc
> '/shares/internal/<dir>/'
> /usr/bin/rsync -avz --human-readable --progress --update
> --ignore-existing --delete --relative rsync-reverse:/root
> '/shares/internal/<dir>/'
>
> And, if the sources are really /etc and /root, you can just combine them
> into the following (and the --relative is redundant because it's based
> at the root directory):
>
> /usr/bin/rsync -avz --human-readable --progress --update
> --ignore-existing --delete --relative rsync-reverse:'/etc /root'
> '/shares/internal/<dir>/'
>
> (in which case you might not even need the ControlMaster/ControlPath
> stuff.)
>

perfect - this is exactly what I am looking for

cheers,

Noah


More information about the rsync mailing list