I have an old backup file (xxx.tar.gz) for the domain abc.com in a remote server. This backup file was created by the WHM daily/monthly backup. This account has been terminated. How do I do a complete restore including webpages, MySQL, chmod values etc? The old username and domain name will be used?
Do I simply do a decompression OR do I create a new cPanel account and restore from there? In either method, how exactly?
Thanks.
If the account is going to be on another server then rsync the backup file to that server and move it to the /home directory.
If it is on the same server, then move the file to the /home directory.
Assuming that the tar.gz file is now available in the /home directory on the server where it will be restored, run the following command as root :
Code:
/scripts/restorepkg username --force
Replace username with the actual username(old account)
This will automatically create the account and restore all your webfiles, databases,emails etc.
If you want to modify the username then once the restoration is complete, do the following :
Code:
vi /var/cpanel/users/username
Change the USER here and run :
Code:
/scripts/updateuserdomains