Restore cPanel backup with restorepkg

cPanel provides a built-in script called restorepkg, which simplifies the restoration of full account backups, including website files, databases, emails, and configurations.

To restore a backup, run

/scripts/restorepkg USERNAME

If you have multiple backup files and need to restore all of them, you can use the following command:

for user in ls *.tar.gz; do /scripts/restorepkg $user ; done

If you want to save restore logs, use:

for user in ls *.tar.gz; do /scripts/restorepkg $user >> /root/restorelog.txt; done

Back to Cpanel Server

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *