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/backup.sh - which is calling the file backup.sh which consists of -

1
2
3
#!/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

comments powered by Disqus