Create a cPanel backup from the command line

You are able to create a backup of a cPanel user’s account by using the pkgacct command in the /scripts directory that can be found on any server that has cPanel installed.  If you needed to create a backup of the account for a user named user1, you would need to be in a root shell, then run the following command.

/scripts/pkgacct user1

Unfortunately, cPanel backups are limited to 4GB, but using the command line, you are able to surpass that limitation and force it to back up the account by using the following:

/scripts/pkgacct user1 --skip-limit-flag

Adding on the –skip-limit flag will allow it to skip the 4GB limit and create the backup.  Then, when the script is finished and the backup has completed, it will tell you the path that it placed the backup and you can move it to whichever directory you would like.  If you are creating this for a user that does not have root access, you will want to put it in their home directory as well as chown it to the user so that they are able to download the backup as well.

Popular Posts
  • No Popular Post Available
Tags:  ,