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 USERNAMEIf 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 ; doneIf you want to save restore logs, use:
for user in ls *.tar.gz; do /scripts/restorepkg $user >> /root/restorelog.txt; doneBack to Cpanel Server

Leave a Reply