LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   silly cron question (https://www.linuxquestions.org/questions/linux-newbie-8/silly-cron-question-4175420194/)

lleb 08-03-2012 09:58 AM

silly cron question
 
how can i include the contents of my crontab into a backup run from a users $HOME directory? in other words i use cron to schedule backups (typically rsync) between server, i would also like to backup the cron entries so i dont have to rebuild them if the Live server goes down.

thanks.

suicidaleggroll 08-03-2012 10:05 AM

What about adding this at the beginning of your backup script:

Code:

crontab -l > cron_backup

lleb 08-03-2012 10:28 AM

thank you, to simple :D.


All times are GMT -5. The time now is 10:32 AM.