Moving hestiaCP to a new server with new IP addresses

server Ubuntu 16 + vestaCP +5 IPv4 —> (move to) new server Ubuntu 20 + hestiaCP + new 5 IPv4.
i have over 3000 sites.

On the new server:

  1. added old IP addresses in hestiaCP
  2. added new IP addresses in hestiaCP
  3. for each user made v-restore-user
  4. I checked, each site was linked to the desired old IP.

How can I change the old IP addresses to new ones on a new server? for all users and in all apache, nginx configs and where else… It is difficult to do this manually for a large number of sites.
Did the hestiaCP developers take care of this?

I’m not sure about this, but if you hadn’t added the old IP address to Hestia on the new server, I think it would have defaulted to the new IP address. Would it be possible to do the migration again, without adding the old IP address to the new server?

If not, and you’re stuck with the current situation, probably your best bet would be to write a script to change all the IP addresses for each site using the command-line tools.

1 Like

that won’t do. You need to link each site to your IP. And not all sites to one

What ‘won’t do’? Did you look at
v-list-sys-ips
v-delete-sys-ip
v-change-web-domain-ip
Usage: v-change-web-domain-ip USER DOMAIN IP [RESTART]

1 Like

Pluto is completly right here, if the old address doesnt exist on the system, it will automatically rewrite it to the new one while restore it. If you add the one aswell, it will not change it due to the fact, that the address is still there.

Thanks. You are right, it will be easier this way. I decided to do this:

  1. do not create old IP addresses
  2. make restore all users
  3. make “v-change-web-domain-ip user domain.com newIP no” for each domain, having previously prepared a list.
  4. then restart nginx and apache

You can automate it if you want

If all domains of the same user need to get assign the same ip:

v-list-web-domains-user
loop trough result and v-change-web-domain-ip user domain new ip no

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.