Get Backup Via SSH From cPanel

Hello, As you know, backup of cPanel is always safer than manual. If you have SSH access and you have more than one site, it is very difficult to get a backup of them one by one. Now I’m going to tell you how to make a backup of all sites with a single command.

Hello,

As you know, backup of cPanel is always safer than manual. If you have SSH access and you have more than one site, it is very difficult to get a backup of them one by one. Now I’m going to tell you how to make a backup of all sites with a single command.

for i in $(ls /var/cpanel/users); do /scripts/pkgacct $i;don

With the above command, the cpanel takes a bulk backup of all the attached sites to the /home directory. If you are going to backup a single user;

/scripts/pkgacct USERNAME

You can back up the user name you specified above with the command. If you want download backups to the computer;

cp backupname.tar.gz /home/username/www/

With the above command, we sent the backup to the user’s folder(ftp). Now we’ll give you permission to download.

chmod 777 backupname.tar.gz

With the above process, we are now allowed to write to the backup and are now ready to download the backup. Your download link schema is below;

http://sitename.tld/backupname.tar.gz