Linux Automated Backup

I've been wanting to setup some sort of automatic backup on my personal data for quite some time, but have always settled on manually copying important documents to a second hard drive. Well thanks to THIS nice guide to setting up rsync and cron I now have it setup.

Short guide shorter:

1) Create a bash script with the following (note there are only two lines below, the command is long):

#!/bin/bash
sudo rsync -av --progress --delete --log-file=<location to put log file>/$(date +%Y%m%d)_rsync.log <directory to backup> <directory to put backed up directory in>

2) Run "sudo crontab -e" and enter the following line to have your backup done every morning at 4am:
0 4 * * * /root/rsync-shell.sh

Comments

Popular posts from this blog

OpenSCAD linear extrude that interpolates between two shapes

Taking Stuff Apart: Realistic Modulette-8

XCode4: UITabBarController with UINavigationController using Interface Builder