How to Recover User crontab -r

This is a quick advice of those who have ran crontab -r accidentally and would like to restore it. Well letter r and letter e is close together therefore this is a very easy mistake to do.


If you don’t have a backup of /var/spool/cron/*user* the only way you could find to recover you crontab commands would be taking a look at the logs of your system.  


For example in RedHat / CentOS Linux distributions you can issue: # cat /var/log/cron And you will see a list of commands executed and the time, from there you will be able to rebuild your crontab.  


Hope this will help someone… 


Leave a Reply

Your email address will not be published. Required fields are marked *