How can I move a slave server to a new subnet and make it work with the master

Discussion in 'ISPConfig 3 Priority Support' started by webguyz, Sep 18, 2023.

  1. webguyz

    webguyz Active Member HowtoForge Supporter

    I am starting a transition to a new datacenter and want to start moving over the entire ISPConfig master and web slaves one at a time to the new subnet.

    I am using Hyper-v and will use Replica to copy over the vms (and keep them synced) and once a vm is moved I want to change the master to reflect the new IP and continue to work with my current Master.

    Do I just go into "System -> Server Config" and change the IP address of the moved web slave and then on the slave itself change the Ip and /etc/hosts file and of course change the DNS entry to match the new subnet?

    I purchased the migration utility but I have a lot of VPS servers and don't want to recreate all new VM's, but was hoping to replicate the physical vm's across (and keep them synced) and then just change whatever was needed to reflect the new subnet.

    Victim of server sprawl and looking for path of least resistence to move everything over while keeping downtime down to a bare minimum.

    Thanks for any and all suggestions.
    Andy
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Try Internet Search Engines with
    Code:
    site:howtoforge.com change ip address of host
    On each host you move, find all places where the IP address is configured, something like
    Code:
    grep --recursive 11.22.33.44 /etc
    where 11.22.33.44 is the current IP-address.
    Then use phpmyadmin to check the database users, each host has at least two uses, one with hostname and one with IP-address, change accordingly.
    I do not remember more exactly, use the seach results for additional info.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Move the server over to new location and configure its IP address in the usual network config files of the Linux distribution you use.
    2) Change the IP address in /etc/hosts on the master and on this system.
    3) Update the MySQL root user on master that exists for this IP address (the one that is used for ISPConfig installation and updates of that node).
    4) Now you must change the ispcsrv* user of this node in master MySQL to new IP address. There are two options for that, either use the user editor of phpmyadmin (use the user editor and don't change it manually in the tables as the permissions are spread over many tables) or alternatively run "ispconfig_update.sh --force" on the slave node you moved to the new IP and choose to reconfigure permissions on master database during the update.
     
  4. webguyz

    webguyz Active Member HowtoForge Supporter

    Thanks Till and Taleman,
    I have done most of this but getting failures when running the cron jobs. I like the suggestion to run ispconfig_update.sh --force and will try that. I have some kind of permissions and this will hopefully clear it up.

    I thought that updating the IP address in Systems -> Server Config it would update the main dbispconfig server_ip table,but it did not and I manually changed the IP.
     
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    Had to add 'root'@'x.x.x.%' to the master db privaleges where x.x.x was the new subnet and now all is good.
     
  6. webguyz

    webguyz Active Member HowtoForge Supporter

    Till,
    To physically move the master server I should just need to change IP and /etc/hosts file and the DNS entry, correct? Do I need to do an ispconfig update with --force as well?

    Thanks
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    yes

    No, not for the master.
     

Share This Page