WHM/cPanel

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

    
     /usr/local/cpanel/bin/backup
    
   

To Force cPanel to perform a new backup via SSH

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


    
   

cPanel Legacy backup system via SSH

    
     /usr/local/cpanel/scripts/cpbackup

    
   

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
XsoftHost Support

Share

Recent Posts

Add Extra IP addresses to server configuration On Ubuntu 17.10 and later

Each failover IP address will need its own line in the configuration file. The configuration…

3 years ago

Create RAID Arrays with mdadm on Ubuntu

What is mdadm? The mdadm utility can be used to create and manage storage arrays…

4 years ago

How to change the maximum upload file size for PHP

There are several scenarios that you might need to increase or decrease your php maximum…

6 years ago

How to install Let’s Encrypt Plugin in WHM/cPanel

What is Let’s Encrypt? Let’s Encrypt is a free certificate authority provided by the Internet…

6 years ago

How to install python in my cPanel and add py extension

Python normally installed on all cPanel hosting server because most of Centos/red hat update system…

6 years ago

How to install and enable GUI GNOME Desktop on centos 7

Usually CentOS 7 comes in a numbers of variants, For most users, there are two…

6 years ago