Backup cPanel Account SSH



Is your server loaded heavily while cPanel backup is running? You can use the following script to backup Entire cPanel account’s home directory, please note that you need to backup MySQL database separately, for MySQL database backup you may use the linkĀ here.


#! Script to Backup cPanel Accounts

for x in `awk '{print $2}' /etc/userdomains | sed -e '/nobody/d'`

ssh root@xx.xx.xx.xx mkdir -p /backup/$x

rsync -arv /home/$x/* root@xx.xx.xx.xx:/backup/$x/.


Thank you for viewing

Leave a Reply

Protected by WP Anti Spam