Saturday, 10 November 2007, 00:00 - Tools & more
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 systemLOCALDIR
: 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 transferredLOGFILE
: File to log output of rsync intorsync_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 systemLOCALDIR
: 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 transferredLOGFILE
: File to log output of rsync intoRemote 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.