Hacker News new | ask | show | jobs
by mooneater 3630 days ago
first thing when logging into new server: place /etc under git. then loss of cron files (or any config file) is easily recovered from.
2 comments

Except that crontabs are usually somewhere in /var. :)
Which is why I only use system-wide crontabs, in /etc/cron.d

Instead of per-user crontabs. Much easier to manage.

With cron.d you can specify what user each cron entry should run as, so it is equivalent.

This is a brilliant idea - thank you!
I cannot count the number of times this has helped or saved me. You can keep the /etc git repo local. Or if its a critical server, push to github private repo. Seeing a history of your /etc edits is a very reassuring feeling.