The CRON
The default backup time for a WHM/cPanel server is embedded in the root CRON. To change the time of the backup, you may need to consider two CRON entries:
The “New” Backup CRON:
0 2 * * * /usr/local/cpanel/bin/backup
The Legacy Backup CRON:
0 1 * * * /usr/local/cpanel/scripts/cpbackup
The new backup CRON runs at 2AM, and the legacy backup CRON runs at 1AM. I generally like to shift both on them in the same direction. For example, if I make the new backup CRON 4AM, I make the legacy backup CRON 3AM.
Triggering manual backups
If you want to test backups, you can manually run the command.
Example 1 (same day error)
[root@example ~]# /usr/local/cpanel/bin/backup [2024-11-23 06:02:31 +0000] info [backup] Started at Sat Nov 23 06:02:31 2024 [2024-11-23 06:02:31 +0000] info [backup] Backups have already run today. Use the --force if you wish to run backups again.
Example 2 (–force)
[root@example ~]# /usr/local/cpanel/bin/backup --force [2024-11-23 06:02:40 +0000] info [backup] Started at Sat Nov 23 06:02:40 2024 [2024-11-23 06:02:40 +0000] info [backup] The backup is now running in the background in process 3795410. [2024-11-23 06:02:40 +0000] info [backup] The backup process’s log file is “/usr/local/cpanel/logs/cpbackup/1732341760.log”.
References
- https://www.24x7servermanagement.com/clients/knowledgebase.php?action=displayarticle&id=126
- https://forums.cpanel.net/threads/whm-cron-backup-vs-cpbackup.401651/