Need Help?

Support Team

24/7 Helpdesk:

24/7 Support Email:

Sales Team

Sales Email:

Sales Phone:

Billing Team

24/7 Client Area:

Billing Email:

Billing Phone:


Recover a Hacked cPanel Server with JetBackup

Recover a Hacked cPanel Server with JetBackup

If multiple accounts are hacked(if not all), you can easily restore them to specific date using the “Multiple Accounts Restore” feature.


The security of the website is of utmost importance, companies these days leave no stone unturned to prevent any unforeseen events, which might compromise any personal or classified information. Therefore, it is always recommended to backup in regular intervals.


This document will make you familiar with the cPanel’s interface which allows you to restore accounts from the backup archives that the system stores in backup directories. You would be able to restore single/multiple accounts, or accounts from a specific date. We here will primarily be focusing on the process to restore multiple accounts.


Restore multiple Account Backups


  • You must enable account backups in WHM’s Backup Configurationinterface for this feature to work. (Home >> Backup >> Backup Configuration).
  • Run the following command, to symlink allof your account backups to the backup/cpback/daily/ directory:
RESTORE_FROM_DATE="YYYY-MM-DD"; if [ ! -d '/backup/cpbackup/daily/' ]; then mkdir -p '/backup/cpbackup/daily/'; fi; for CP_BACKUP in $(find /backup/"$RESTORE_FROM_DATE"/accounts/ -type f); do CP_ACC=$(echo "$CP_BACKUP" |awk -F/ '{print $5}'); ln -sv "$CP_BACKUP" "/backup/cpbackup/daily/$CP_ACC"; done
  • After the backups are restored, you may wish to remove all the symlinks created, to get that done, run the following command:
find /backup/cpbackup/daily/ -type l -delete
  • To append all cPanel backup accounts to the Backup Retoration Queue, execute the following steps:
  1. All backups can be restored with the Legacy Restore Multiple Accounts feature.
  2. Run this command to append  available account packages to the ‘Backup Restoration’ queue, with all options checked except the dedicatedip option:
RESTORE_FROM_DATE="2016-02-25"; BACKUP_TYPE="daily"; if [ $BACKUP_TYPE="daily" ]; then BACKUP_BASE="/backup/$RESTORE_FROM_DATE/accounts/"; else BACKUP_BASE="/backup/$BACKUP_TYPE/"$RESTORE_FROM_DATE"/accounts/"; fi; for CP_ACC in $(find "$BACKUP_BASE" -type f -name '*.tar.gz' |awk -F/ '{print $5}' |sed 's/.tar.gz//g'); do /usr/local/cpanel/bin/backup_restore_manager add user="$CP_ACC" restore_point="$RESTORE_FROM_DATE" mail_config=1 mysql=1 subdomains=1; done

Please note the following points


  • Replace YYYY-MM-DD with the date you wish to restore to.
  • Replace weekly with desired frequency for taking backups.



-D, –data   to pass the data to the selected page and view.

-f, –force   no action prompt and to force commands