Backup Rsync

From EpixStudios

Jump to: navigation, search

Set up Automatic SSH Keys so you can login to the server with no password.

create an executable script (chmod +x)

rsync -e ssh -avz --log-format="%%o %%t %%f" --exclude-from=/home/damian/excludes.txt /home/damian/ damian@epixstudios.co.uk:/home/damian/backup/ > scripts/rsynclog.txt
scp scripts/rsynclog.txt damian@epixstudios.co.uk:/home/damian/scripts

add user to the group 'cron'

as normal user run

crontab -e

and add the line

0 0,12 * * *    scripts/backup

which runs the script twice every day (mid-night and mid-day)


http://www.cc.gatech.edu/~nsimhan/automatic.html

Personal tools