Gary Kline wrote:

        I've just installed/reinstaled rsync here on (aka
        "sage") and on  I've fiddled with the rsyncd.conf on
        both FBSD systems.  What I don't understand is how rsync, using
        ssh, gets past the secret password.  If, say, I want to
        copy all of my www files from sage to zen, what do I put
        into /usr/local/etc/rsyncd.secrets? Let's say that rsyncd.secrets

        # User : pw
        root : abcd
        kline: wxyz

I'd use ssh keys, check the man page on how to specify keys for use with rsync/ssh.

rsync --verbose  --progress --stats --compress --rsh=/usr/local/bin/ssh
      --recursive --times --perms --links --delete \
      --exclude "*bak" --exclude "*~" \

Careful with wildcards, they may be interpreted different than you expect.

I made this script, the script assumes that paths are the same on source and destination:

# RSYNC_USER is set as an environment variable or defaults to $USER

# Exit if RSYNC_HOST not defined, there is no good default value.
if [ -z $RSYNC_HOST ]; then
  echo "RSYNC_HOST undefined, no host to syncronize with.";

# RSYNC_PATH sets the path to be syncronized, defaults to $HOME
# would be neat to check if path is absolute or else assume relative
# to $HOME or set RSYNC_PATH as environment/command line variable
if [ -z $1 ]; then
# Syncronize folders
echo "Syncing $RSYNC_PATH..."

# Exclude patterns may be stored in .rsync in the home directory or
# the sub directory being syncronized
if [ -f $RSYNC_PATH/.rsync ]; then
  rsync -Cptuvaz --rsh="ssh" --exclude-from=$RSYNC_PATH/.rsync \
  rsync -Cptuvaz --rsh="ssh" \


You put your exclude list in a file, .rsync (see the man-page), what to exclude may depend on the directory you're rsyncing. If you're automating this as a cron-job, then you may not have the environment variables set.

I think that rsync defaults to ssh so the --rsh is really obsolete, but I like to make it explicit.

Cheers, Erik
Ph: +34.666334818                      web:
X.509 Certificate:
Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9
_______________________________________________ mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to