Identification of backup files
I have configued WHM to do backups each night, retaining 2 daily, 2 weekly and 2 monthly. But there are 8 backup files being stored, two of which do not make any sense to me.
Here is ls -l of files:
-rw------- 1 root root 41512029556 Aug 6 02:51 /backup/2022-08-06/accounts/mydomain.tar.gz
-rw------- 2 root root 41512867911 Aug 7 02:50 /backup/2022-08-07/accounts/mydomain.tar.gz
-rw------- 1 root root 41513429405 Aug 7 01:51 /backup/cpbackup/daily/mydomain.tar.gz
-rw------- 1 root root 46707633961 Aug 2 01:58 /backup/cpbackup/weekly/mydomain.tar.gz
-rw------- 1 root root 45585525468 Jul 1 02:56 /backup/monthly/2022-07-01/accounts/mydomain.tar.gz
-rw------- 1 root root 46705874908 Aug 1 02:59 /backup/monthly/2022-08-01/accounts/mydomain.tar.gz
-rw------- 1 root root 46703942381 Jul 31 02:57 /backup/weekly/2022-07-31/accounts/mydomain.tar.gz
-rw------- 2 root root 41512867911 Aug 7 02:50 /backup/weekly/2022-08-07/accounts/mydomain.tar.gz
All the backups with date in the path make sense to me. The two that do not are:
- /backup/cpbackup/daily/mydomain.tar.gz
- /backup/cpbackup/weekly/mydomain.tar.gz
-
Hey there! If you're seeing the correct data inside /backup/2022-08-06/accounts/, you can delete the /backup/cpbackup/daily/mydomain.tar.gz files. The biggest different is the "cpbackup" portion of the filename, as that was the name of the old backup script. Is it possible you have both the old and the new backups configured? If this is an older server that has been consistently updated as new versions of cPanel are released, it's technically possible both those scripts could still exist. I would recommend checking root's crontab with the "crontab -e" command to see if you have both of these lines: /usr/local/cpanel/bin/backup /usr/local/cpanel/scripts/cpbackup
If so, you can remove the cpbackup entry, leaving the /bin/backup in place, to keep this from happening in the future.0 -
Hmm, not really that old. Moved from shared hosting to dedicated server in October 2020. But yes, both backups were in cron, removed the one you suggested, will monitor tonight. Thanks so much. 0 -
Let us know if that does the trick! 0 -
Yes, removing the /scripts/cpbackup from crontab worked just fine. Thank you so much, I was beginning to regret going with a 512Gb SSD drive vs. a 2Tb HDD. Now my decision is vindicated. I also looked at another client of mine on dedicated server: cpanel_and_whm: 11.94.0 operating_system_name: cloudlinux operating_system_version: 6 Their crontab is weird: MAILTO='cron@mydomain.org' SHELL="/bin/bash" 0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1 SHELL="/bin/bash" 30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1 SHELL="/bin/bash" 35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check SHELL="/bin/bash" 45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache SHELL="/bin/bash" 30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache SHELL="/bin/bash" 25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1 SHELL="/bin/bash" 15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1 SHELL="/bin/bash" 15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1 SHELL="/bin/bash" */5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1 SHELL="/bin/bash" 45 12 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify SHELL="/bin/bash" 8,23,38,53 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1 SHELL="/bin/bash" 0 2 * * * /usr/local/cpanel/bin/backup #30 2 * * 2 (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null) SHELL="/bin/bash" 30 2 * * * /etc/upcp_control SHELL="/bin/bash" 0 3 * * * /usr/local/cpanel/scripts/cpbackup SHELL="/bin/bash" SHELL="/bin/bash" @reboot /usr/local/cpanel/bin/onboot_handler 5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1 0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1 16 19 * * * /usr/local/cpanel/3rdparty/quickinstall/scripts/getCache.pl 22 22 * * 7 /usr/local/cpanel/scripts/send_api_notifications > /dev/null 2>&1 09,39 * * * * /usr/local/cpanel/scripts/clean_user_php_sessions > /dev/null 2>&1
I want to also remove the /scripts/cpbackup line from crontab but do not want to mess anything else up. Should I just remove /scripts/cpbackup line or does this crontab need more work?0 -
You can just remove the one line. I think some of those entries get removed in later cPanel versions, but it's fine to leave everything there that I see. 0 -
Yeah, that worked. Everything is fine now, thanks. 0 -
I'm glad that went well for you! 0
Please sign in to leave a comment.
Comments
7 comments