Restoring a cPanel Account via JetBackup 5 CLI (Remote Snapshot)
This guide shows you how to manually restore a cPanel account from a JetBackup snapshot on a remote backup server using the JetBackup CLI.
Use this method if the JetBackup GUI interface is unavailable, or during server migrations and disaster recovery.
Prerequisites
-
Root SSH access on both the source (backup) and destination (cPanel) servers.
-
JetBackup 5 installed on the destination server.
-
Knowledge of the snapshot path (e.g.,
/path/to/backup/{USER}_{UUID}/snap.1).
Step 1: Package the Snapshot (on Backup Server)
Log in to your Backup Server via SSH and run the following commands to structure and compress the backup for JetBackup 5:
Bash
cd /path/to/backup/{USER}_{UUID}/
mkdir backup
cp -av snap.1/* ./backup/
tar -czvf jetbackup5-{USER}.tar.gz backup/
Note: The archive MUST contain a top-level directory namedbackupfor JetBackup 5 to process it correctly.
Step 2: Transfer the Backup Package
Log in to your Destination cPanel Server via SSH and download the archive using
rsync (recommended over scp for large files to allow resuming if disconnected):Bash
rsync -P -e ssh root@BACKUP_IP:/path/to/backup/{USER}_{UUID}/jetbackup5-{USER}.tar.gz /home/
Replace
BACKUP_IP, {USER}_{UUID}, and {USER} with your actual details.Step 3: Run the JetBackup Restore
-
Execute the restore command on the destination server:
Bashjetbackup5 --restorepkg /home/jetbackup5-{USER}.tar.gz -v -
JetBackup will start the process and output a log path:
PlaintextLog File: /usr/local/jetapps/var/log/jetbackup5/queue/2_cli/123456789.log -
Monitor the restore progress in real time using
tail:
Bashtail -f /usr/local/jetapps/var/log/jetbackup5/queue/2_cli/123456789.log
Step 4: Cleanup
Once the restore completes successfully and you have verified the account is working, delete the
.tar.gz archive to free up disk space:Bash
rm -f /home/jetbackup5-{USER}.tar.gz