Simple Backup Script with Rsync
Rsync can be used for a numerous tasks. One of them is to create backups of your valuable data. I have used Rsync as my simple backup of my home directory to an external hardisk drive for some time. The script below simply create a copy of what i want to backup to an external HDD. However, i did not use incremental backup method provided by Rsync. I use the "delete" and "update" switch to enable Rsync to overwrites older data and delete obsolete data in my backup drive. This will eliminate significant amount of time taken if your whole data that need to be backup is huge. Most of the time i run this backup manually because i will only backup if i plug in my external HDD to my PC. However, this script can also be use to scheduled it into cron and backup data to a separate internal HDD or volumes/partition. -----Start----- #!/bin/bash #INITIALIZATION #Log file name NOW=$(date +"%d%b%y") LOGFILE="$NOW.log" LOGDIR= specify your log files detination #...