cPanel Backup through SSH

Description of your first forum.
Post Reply
nelsonjulia811
Posts: 11
Joined: Thu Jan 22, 2015 4:16 pm

cPanel Backup through SSH

Post by nelsonjulia811 » Fri Jul 17, 2015 10:50 pm

Hello,

How to Create a Full cPanel Backup through SSH.

Thanks

Sophia
Posts: 11
Joined: Mon Dec 29, 2014 4:16 pm

Re: cPanel Backup through SSH

Post by Sophia » Mon Jul 20, 2015 10:06 pm

We will require to log into our server via SSH as root.

We will then execute the command /scripts/pkgacct $user.
Note:-$user is used in the sense that it represents the username of the cPanel account you are trying to create backup..
Parameter Description


$user == This variable is required whenever --bincheck is not used. When passing this variable, replace $user with the username corresponding to the cPanel account we desire to package.

$destination == This is an optional variable that allows us to specify the path to the directory in which we want to store the cpmove archive. The $destination variable must follow the $user variable, e.g./scripts/pkgacct $user $destination.

–allow-override == Causes the script to use instructions in/var/cpanel/lib/Whostmgr/Pkgacct/pkgacct, if any are present.

–bincheck == This parameter ensures that any scripts called by the cPanel binary will run. If winning, the script will print 'BinCheck ok'. When using this case, we do not need to pass $user.

–version == The version of the archive being created.

–mysql == The version of MySQL used by the account’s databases.

–use_backups == Causes the most recent backup to be converted into a cpmove archive. This option will speed up the process but may result in lost or old data.

–skiphomedir == This parameter will exclude the user’s home directory from the archive. If the account will be transferred, the user’s home directory can be moved with a faster protocol.

–incremental == When this parameter is used, only information that was not contained within the previous archive will be packaged. This parameter will not work if no cpmovearchive is found.

–split == Causes the archive to be created in chunks. This will reduce the overall load on the system.

–nocompress == Passing this parameter will leave the resulting cpmove archive uncompressed.

–compress == This parameter can override the --nocompress argument if it is present. There is no reason to use this argument as archives are compressed by default.

–skipacctdb == This parameter prevents the account’s databases from being included in the archive.

–userbackup == Allows the user to use the resulting cpmove archive as a backup for the account.

–backup == Causes the resulting archive to be used as an account’s backup.


Note: The syntax detailed in this document is for cPanel & WHM versions 11.28 and later.

anthonywilliam691
Posts: 15
Joined: Wed Jan 21, 2015 5:24 pm

Re: cPanel Backup through SSH

Post by anthonywilliam691 » Wed Nov 10, 2021 7:06 am

Instead, you can use The pkgacct Script to back up a single cPanel account. Log into your server as root through SSH to utilise this script. Then run the following command, optionally include flags, followed by the username of the cPanel user you want to backup and the output directory.

charliethrse
Posts: 8
Joined: Wed Jan 21, 2015 4:12 pm

Re: cPanel Backup through SSH

Post by charliethrse » Wed Dec 15, 2021 4:00 am

1. Log in as the Root user to SSH.
2. Next, type /scripts/pkgacct username into the command prompt.
3. Your account will be backed up and kept in the current directory.

Post Reply
cron