#!/bin/sh # # $Id$ # # The author disclaims all copyrights and releases this script into the # public domain. # # Example script to mirror the home directory for a user to a server via # rsync over SSH. # for copy to $HOME/backup/$SHORTHOST directory on server SHORTHOST=`hostname | awk 'BEGIN { FS="." } { print $1 }'` cd $HOME || exit 1 rsync -v --delete --delete-excluded --exclude-from=$HOME/.rsync/exclude \ --timeout=999 -az \ -e 'ssh -c blowfish -i .ssh/backup -ax -o ClearAllForwardings=yes' \ $HOME/ server:backup/$SHORTHOST