How to backup the cronjobs of all users on Debian and Ubuntu Linux?

Last Updated on April 18, 2021 by admin

The cronjobs (crontabs) for all system users in Debian and Ubuntu Linux are stored in the directory /var/spool/cron/crontabs. To make a backup with tar, use this command:

tar pcfz /root/user_crontabs.tar.gz /var/spool/cron/crontabs

The backup file user_crontabs.tar.gz is be stored in the /root/ folder.

Leave a Comment