I recommend using cron for scheduling backup. To edit your cronfile, enter this in the terminal: crontab -e. Then insert your backup entries. Here is my example (\ and newline where added for easy reading, \ and the newlines that follow should not appear in the file.):
# MIN HOUR DAYOFMONTH MONTHOFYEAR DAYOFWEEK(sun=0, mon=1) # Backups 30 19 * * * $HOME/bin/rsyncbackup -b -v -s daily -e email@myhost.com >> \ $HOME/backup/logs/backup.daily.log 30 05 * * * $HOME/bin/rsyncbackup -b -v -s nightly -e email@myhost.com >> \ $HOME/backup/logs/backup.nightly.log 30 04 * * 0 $HOME/bin/rsyncbackup -b -v -s weekly -e email@myhost.com >> \ $HOME/backup/logs/backup.weekly.log
This crontab example starts a backup every day at 19:30 using the backupset found in backupset.conf
. It also does a backup 05:30 every night, using the backup set: [nightly]
. Every Sunday night at 04:30 the weekly backup specified within the backup set [weekly]
is run. Note the -e email@myhost.com
option which tells rsyncbackup to send you an e-mail to the specified e-mail address when errors occurs during backup. Very convenient! However, be aware that if your crontab contains errors and the script is not called, then e-mail will neither be sent. Sending e-mail also requires Postfix or sendmail to be configured at the computer. If you turn your computer into sleep or off at night, you might want to install and configure anacron.