PDA

View Full Version : How i restored OpenVZ dump of WHM/cPanel VPS



Fli
10-31-2014, 07:40 PM
Running WHM/cPanel on an VPS can have advantage that whole installation is portable. For example i have an OpenVZ virtualizor on server and i can backup whole OpenVZ VPS by one simple command (vzdump is used).

Then install OpenVZ and HyperVM on new server, transfer VPS .tgz backup file and restore (command: vzrestore). Here is my notes how i restored my VPS backup with WHM installed on it:

copy VPS backup file from old to new server OR better, use vzmigrate with --online and
install hypervm with openvz on new dedi server (http://internetlifeforum.com/virtualisation/170-installing-server-vps-reselling-hypervm-hypervisor-openvz-x-xen/)
change cpanel license IP with your cpanel lic. reseller
reboot (into should reboot automaticaly into openvz kernel)
vzdump --restore /vzdump-860.tgz 860
vzctl start 860 (start vps)
vzlist
vzctl set 860 --ipdel all --save (delete all old ips assigned to old vps)
vzctl set 860 --ipadd NEWIPTHATIASSIGNTOAVPS --save
vzctl exec 860 /usr/local/cpanel/cpkeyclt (update cpanel license for this new VPS IP)
whm: https:// (https://5.9.180.123:2087/)NEWIPTHATIASSIGNTOAVPS (http://newipthatiassigntoavps:8888/):2087/
Server Configuration >> Basic cPanel & WHM Setup , change IP address from old to new
WHM >> IP functions >> IP Migration Wizard
WHM >> Multi Account Functions >> Change multiple sites' IP address (this process also changes all DNS zones IPs from odl to new)
WHM >> Restart Services >> DNS Server (BIND/NSD/MyDNS)
http://www.intodns.com/hosteddomain.tld
DNS / Edit Zone , check if proper IP
hypervm: http://newipthatiassigntoavps:8888/ , click icon: Import Raw VPS


if zone editor show old ips (very unprobable), change dns ip manually, then: cd /var;cp -rp named named.backup110527
update dns zones serials: WHM/DNS Functions/Set Zone Time To Live (i would select all and change value to something else and it worked to change serials of all zone files) OR you can try other command line trick: https://enterprisevpssolutions.com/evdsportal/knowledgebase/article/168/update-serial-cpanel-whm-script -OR-
http://forums.cpanel.net/f31/how-incremental-serial-number-dns-zone-211732.html -OR- http://forums.cpanel.net/f31/bulk-dns-zone-update-351991.html#post1416551
Reload Bind then.

all worked GOOD, surprisingly. PS: I did this process 2 times already

PTR record: After change of WHM IP (move to another server), ask new server provider to change "PTR record" for your new IP to your server hostname "yourfqdn.hostname.tld". This hostname should resolve back to your VPS IP. How? by creating new A record in the DNS zone file of your domain "hostname.tld". ie: miniserver.myhosting.com , we need to edit DNS Zone file in the hosting account where is hosted myhosting.com website. and point miniserver(.myhosting.com) to YOURWHMSERVERIPHERE