How to change a cPanel account domain name from Command Line?
Hello,
I'm creating a script to backup a cPanel user account from serverX and restore it on ServerY.
During the restoration process, I want to change the domain name from domain.com to domain.net, but I'm unable to find the command line that does that.
Both servers are dedi servers and I have root privileges. Both of them have WHM/cPanel installed as well.
So far what I have in the restoration process is:
Any help is appreciated. Thanks
#Restore account on serverY
/scripts/restorepkg --force --ip=xxx.xxx.xxx.xxx /home/backupes/backup/cpmove-user.tar.gz
#changing account domain name ???
#Change password
/scripts/chpass user passwd
/scripts/ftpupdate
Any help is appreciated. Thanks
-
Hello :) There are no native features that will allow you to change the domain name during the restore process in the same way that you can change the username with the "--newuser" flag. Is there a specific reason this needs to happen before the restore? For instance, does the domain name exist on the destination server already? You could modify the account after it's been restored via the UI, but not during the restorepkg process itself. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment