How to run and force cPanel backup using SSH

cPanel allows you to force cPanel backup the system using SSH connection :/usr/local/cpanel/bin/backup script to run a manual backup in WHM via the command line. 

The system reads the backup configuration file and then performs the actions defined in the file. By default, the system performs this process in the background.

cPanel Backup Shell Commands

To Run NEW cPanel Backup System via command


To Force cPanel to perform a new backup via SSH

					/usr/local/cpanel/bin/backup --force


cPanel Legacy backup system via SSH



Force cPanel to perform a new backup via SSH

					/usr/local/cpanel/scripts/cpbackup –-force

All Manual Backup Script Options

The /usr/local/cpanel/bin/backup script accepts the following options:

  • Debug : Runs the backup in the foreground and prints its progress on the command line. Example :–debug
  • Allow Override:When the system performs the backup, use the pkgacct script in the the /var/cpanel/lib/Whostmgr/Pkgacct/pkgacct directory. Example : –allow-override
  • Force Option:Performs extra backup, even if the system already contains up-to-date backup data files. Example: –force
  • Help: Displays additional information.Example :–help

Run Script Backup for single account

To back up a single cPanel account, you can use The pkgacct Script instead.

To perform this single backup :

  1. log into your server via SSH as root. 
  2. Run the following command, optionally adding flags, followed by the username of the cPanel user you’d like to backup, and the directory you’d like used for the output.

pkgacct Script Backup Option

  • USERNAME : Required The cPanel account username for which to create a cpmove archive. You must pass this option after any options, but before the DIRECTORY option.
  • DIRECTORY:The directory path in which to store the archive. By default, the script uses the /home directory. You must pass this option after the USERNAME option.
  • –allow-override:Use the /var/cpanel/lib/Whostmgr/Pkgacct/pkgacct file to package the account, if it exists.
  • –mysql=VERSION:The archive’s required minimum version of MySQL®. Example : –mysql=5.2.1
  • –roundcube=VERSION:The archive’s required minimum version of Roundcube. Example : –roundcube=3.0
  • –dbbackup=TYPE:With Types :all, schema ,name. Example : –dbbackup=all
Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts