#!/bin/sh
# (c) 2008 linux-tipps.blogspot.com
#
FROM=/home/user
# the base path
DIRS="Desktop Documents"
# you can also use absolute paths
RSYNC="rsync -av --progress -e ssh"
# add -z for compression
ssh-add -l || ssh-add
# this adds ssh private keys if not added already
# for cron scripts use keychain instead:
# source ~/.keychain/*-sh
# see here for more
cd $FROM
$RSYNC -z $DIRS djtm@server1:/some/path/Backup/ &
$RSYNC $DIRS djtm@server2:/some/path/Backup/ &
wait && echo Sync Done. || echo Sync Failed or Aborted.
Home » script » A Tiny Backup Script with Rsync
A Tiny Backup Script with Rsync
Diposkan oleh Unknown on Wednesday, November 5, 2008
{ 0 komentar... read them below or add one }
Post a Comment
Come on share your comment, but please do not spam