Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

Switching to new cloud instance

Comments

10 comments

  • GoMummyHosting
    Hello, Under path /var/cpanel/userdata/ you will see dirs of all users, just replace IPs for all domains using replace command then run easyapache.
    0
  • vpswing
    Related to the above, are there any background tasks/cronjobs that would update the /etc/apache2/conf/httpd.conf ? Because I just discovered that after making the manual changes to the IP addr, a few hours later, they were reverted back to the old IP (10.0.0.5)
    0
  • GoMummyHosting
    Hello, Yes, you should not edit httpd.conf manually. As I said, make the changes in the files that are present under /var/cpanel/userdata/username then run easyapache to fix the issue. Replace username with actual cpanel user name.
    0
  • cPanelLauren
    Wait, @GoMummyHosting that advice is unsupported there is a better method for this that does not have the same potential for irreparable damage. @vpswing the best method to resolve this is to utilize the IP address migration tool which can be found here:
    0
  • vpswing
    Thanks @GoMummyHosting and @cPanelLauren for responding! I tried to add the new IP via the web Interface, but I get this message that the IP (10.0.0.8) is already an active IP. But when I tried to change the Site's IP (from the "Acccounts Function" section), I don't see this internal IP, but only the Public IP (from the Cloud provider). What else can I do to make this 'switch' ? Re: same potential for irreparable damage. May I ask what kind of 'irreparable damage' that might happen if I follow @GoMummyHosting advice? Thank you.
    0
  • cPanelLauren
    Modifying the userdata in the manner suggested can cause the userdata to become corrupted which is what all account information is based on. In the event this happens, it's possible that you will not be able to recover it without a full backup. Further to that the IP is referenced in far more places than just those files and in order to properly switch over you'd need to manually modify every reference. Also, you don't "run easyapache" anymore for anything. EasyApache 4 is package based and there's no need for recompiling using EasyApache as there was in previous versions and because of that, it wouldn't have fixed your issue it would have let the accounts in a broken state. Can you show me the output of the following? (change the actual public IP before submitting) cat /var/cpanel/cpnat
    I tried to add the new IP via the web Interface, but I get this message that the IP (10.0.0.8) is already an active IP.

    If the IP is already present on the server at WHM>>IP Functions >> Show or Delete current Ip addresses you shouldn't need to add it. The IP address migration tool as I noted previously would be the advised method of moving all the sites to the new ip. If you've not gotten a new public IP it should reference that in the cpnat file I asked you to provide.
    0
  • vpswing
    Hi @cPanelLauren , cat /var/cpanel/cpnat ==> 10.0.0.8 104.37.196.XX (<-- a valid IP, I just replaced it with 'xx') WHM >> IP Functions >> Show or Delete also shows the same info above. What does this mean? That all is "ok" ? If so, then why does the file "root.accts" and the files in the "userdata" still reflects the old IP ? Thanks!
    0
  • vpswing
    This issue - the /etc/apache2/conf/httpd.conf was changed again yesterday - to use back the OLD internal IP. I do not know why. cat /var/cpanel/cpnat - shows the correct info, i.e. correct mapping between the internal IP and public IP This time, though, cat /var/cpanel/root.accts shows the public IP for each of the accounts. Only one of the accounts (in /var/cpanel/userdata/ ) is still using the OLD internal IP. All other accounts are using the new internal IP. How do I get rid of this OLD internal IP addr ? Thanks!
    0
  • cPanelLauren
    I'm not sure how that would happen but this would be something best handled through a ticket. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks!
    0
  • vpswing
    Hi Lauren, I've opened a ticket already (#93479134) and Eric has replied with instructions. cd /var/cpanel/userdata/ sed -i 's/10.0.0.X/10.0.0.Z/g' * (replace 10.0.0.X with 10.0.0.Z ) /scripts/updateuserdatacache --force (cPanel script to force update on user's data cache) /scripts/rebuildhttpdconf (cPanel script to rebuild httpd.conf) Thanks!
    0

Please sign in to leave a comment.