Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the even of a crash I realize that I may not be backing up system and user cron jobs. How can I automate the backing up of my systems cron jobs?

share|improve this question
<snide remark> With another cronjob of course! </snide remark> - in all seriousness though, good question. :) – James Feb 24 '12 at 1:25

Yeah another cronjob for the automation but in terms of collecting everything together, there are a few directories you want to cater for:


Back those up, and you should have everything. You can do that with:

sudo tar cvf cron-backup.tar /etc/cron.* /var/spool/cron/crontabs
share|improve this answer

crontab -l > /path/to/your/backup/file

For example:

crontab -l > /var/backups/${USER}.crontab.list

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.