You need a root access to be able to perform a backup/restore via command line.
Creating a cPanel Backup via SSH
To create a backup of your individual cPanel account using SSH, just follow these steps:
First, log in to SSH as the Root user.
Next, enter the following command string on the command line interface:
/scripts/pkgacct username
A backup of your account will be created and stored in the directory you are currently in.
Restoring a cPanel Backup via SSH
To restore a previously created backup of your cPanel account, just follow these steps:
First, if you haven’t already, log in to SSH as the Root user.
Navigate to the directory containing your backup file. *Note: In order to restore your data, you must be in the correct directory.
Next, to restore your cPanel backup, enter the following command into the command line:
/scripts/restorepkg username
If the account exist and you want to overwrite it you have to use the flag --skipaccount
/scripts/restorepkg --skipaccount username