Ubuntu Terminal: How to Back up Your Crontab File

To generate a back up of a crontab file is actually pretty simple, making use of the built in -l switch that comes with the command:

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

See what we did there? The -l switch spits out the crontab file’s contents and we simply pipe that into a file. Easy peasy. Note that sudo crontab and crontab are two different files, meaning you might want to backup both if you make use of the two different cron job files…

You might also enjoy:

About Craig Lotter

Craig Lotter is an established web developer and application programmer, with strong creative urges (which keep bursting out at the most inopportune moments) and a seemingly insatiable need to love all things animated. Living in the beautiful coastal town of Gordon's Bay in South Africa, he games, develops, takes in animated fare, trains under the Funakoshi karate style and for the most part, simply enjoys life with his amazing wife and daughter. Oh, and he draws ever now and then too.
This entry was posted in Tutorials, Ubuntu and tagged , , , . Bookmark the permalink.
    blog comments powered by Disqus