memo.xight.org

日々のメモ

rsync の使い方

#!/bin/sh

RSYNC=/usr/bin/rsync
LOCAL_PATH=/path/to/target/

REMOTE_USER=username
REMOTE_HOST=example.com
REMOTE_PATH=/path/to/backup/

$RSYNC -avz -e ssh $LOCAL_PATH $REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH