Restore cPanel backup via command line Print

  • cpanel backup, cpanel restore
  • 5

 

cPanel Backup and Restore via SSH

To perform a backup or restore of a cPanel account via command line, you must have root access to the server.

 

Creating a backup

To create a backup of your individual cPanel account using SSH:

  1. Log in via SSH as root user.
  2. Run the following command:
/scripts/pkgacct username

The backup will be generated and stored in the current working directory.

 

Restoring a backup

To restore a previously created backup:

  1. Log in via SSH as root user.
  2. Navigate to the directory containing the backup file.
  3. Run the following command:
/scripts/restorepkg username

If the account already exists and you want to overwrite it, use the --skipaccount flag:

/scripts/restorepkg --skipaccount username

 

Note

Always ensure you are in the correct directory before running the restore command. Misuse may result in data loss.

 


Was this answer helpful?

« Back