Data Synchronisation scripts for rsync
Saturday, 10 November 2007, 00:00 -
Tools & morePosted by Administrator
Some simple
shell scripts for synchronize your data using rsync.
You only have to adapt the variables at the beginning of the scripts according your needs.
rsync_home.sh
This one can be used if you have your remote system mounted onto the local file system, e.g. using NFS or SAMBA
Variables:
MOUNTPOINT
: Path on local system where you have mounted the exported path of remote system
LOCALDIR
: Path on local system from where you want to synchronize (by default your home directory)
EXCLUDEFILE
: File where you can enter all path's (one on a line) that shouldn't be transferred
LOGFILE
: File to log output of rsync into
rsync_home_ssh.sh
This one is an example if you want to access the remote system over SSH.
Variables:
REMOTEHOST
: Full qualified host name of remote system
LOCALDIR
: Path on local system from where you want to synchronize (by default your home directory)
REMOTEDIR
: directory on remote host after the colon (":") (by default your home directory)
EXCLUDEFILE
: File where you can enter all path's (one on a line) that shouldn't be transferred
LOGFILE
: File to log output of rsync into
Remote Host can be either preset or passed as a command line parameter.
For not have to type your passphrase for your ssh key every time, you can store it within your
SSH agent.