Rsync (backup files of remote server)

Prepare a ssh key without passphrase in a secure place (encrypted volume), like /Volume/private/ssh

cd /Volume/private/ssh
ssh-keygen -t rsa -f /Volumes/private/ssh/id_rsa

Then prepare a ssh config file

vi $HOME/.ssh/config
# add the following connection settings
Host myserver
    Hostname <server-host>
    User <ssh-user>
    IdentityFile /Volumes/private/ssh/id_rsa

Set the crontab

0  */4   *   *  *   rsync -avL myserver:backup/latest /Users/pik/backups > /dev/null 2>&1
Feb. 6, 2011, 1:43 a.m. index
You are here quickies:bash:rsync