LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   replaced crontab, now should get crontab back to what it was (https://www.linuxquestions.org/questions/linux-newbie-8/replaced-crontab-now-should-get-crontab-back-to-what-it-was-676998/)

raminn 10-17-2008 01:22 AM

replaced crontab, now should get crontab back to what it was
 
Hi all,

I was trying to learn how crontab works. I made a file with an echo command in it and used crontab -u root myfile.

The problem is that when i checked crontab -l i saw that all other jobs were gone and there only was myfile. I used crontab -r in hope that after removing it'll be back to its before jobs. But now when i use crontab -l it says 'no crontab for root'. I tried service crond restart, but no change. How can i get it back to the way it was? Though i had no idea what jobs it had. This is very urgent as i did on an important server.

Thanks for the help in advance.

Ramin.

billymayday 10-17-2008 05:50 PM

Do you have a backup?

Look for /var/spool/cron/root

raminn 10-20-2008 07:15 PM

Yes, it was there :cool: and i used it to restore crontab.

Thank you so much for great help.

Ramin.


All times are GMT -5. The time now is 07:48 PM.