Date Series Part 1 of script Tags bash / cron / script

I've now automated my backups with the following line in my users crontab - 00 */3 * * * /home/boztu/cron/ - which is calling the file which consists of -

#!/bin/bash -x
 #shell script for use with rsync in user crontab
 /usr/bin/rsync -av /home/boztu/ /media/disk/`/bin/date +%Y%m%d`/ >> /home/boztu/cron/backup.txt.

This automates the file creation so that I don’t have to create it and change the date, it does it all for me! And it works flawlessly and does incremental backups every three hours.


comments powered by Disqus