#!/bin/bash OPTIONS=" --archive --update --delete --numeric-ids --verbose --one-file-system --progress --rsh=ssh " # beware when merging.. --update will take the most recent copy, but # if the target has deleted the file, and the source has a more recent # version than the one deleted, you're fucked. # in short: never confuse BACKUP (clone) with RESTORE (clone in the # other direction) or with MERGE for that matter. SECONDS=3 trap 'echo "INTERRUPT" ; exit 1' SIGINT exec rsync $OPTIONS "$@"