Replace server in cluster

Discussion in 'Installation/Configuration' started by Georgy Goshin, Feb 6, 2021.

  1. Georgy Goshin

    Georgy Goshin New Member

    Hi there
    Is there any standard way or howto replacing the live server in the cluster.
    I have a cluster running 3.2.1 on CentOS 8 and one of the servers running web and mysql roles should now be replaced due mistakes in initial configuration and unrecoverable damaged RPM database with the almost the same way configured web/mysql server with CentOS 7.

    Thanks.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What do you want to move over and what should not be moved over?
     
  3. Georgy Goshin

    Georgy Goshin New Member

    I want to move everything: all sites and databases currently running on damaged server
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  5. Georgy Goshin

    Georgy Goshin New Member

    In the tutorial written that the tool will copy data from another panel, but in my case I have an ISPConfig 3.2 with the following servers

    1. Panel and NS1
    2. NS2
    3. mail
    4. web and database

    I would like to replace only 4th server now but there are already a live sites and databases
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    It works for migrating data from ISPConfig slave server to ISPConfig slave server aswell.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The Migration Toolkit consists of 2 different tools, the Migration Tool and ISPCopy. The Migration Tool is more versatile as it can migrate servers but also merge them and other fancy things like migration servers partially by client etc, but the drawback of this importing approach is that you can't use it for servers that are connected to the same master. So if you have tow server nodes in a multiserver that are connected to the same master server, then you can't use the Migration Tool in this case. But, the Toolkit consists of 2 tools, and the second tool is made for this exact case. The second tool is named ISPCopy, it copies an ISPConfig installation as it is to a new server, this means you can use it to transfer a slave system to new hardware while keeping it connected to the master.

    The steps are:

    1) Install the new system in that way that it runs the same services as the old system, the OS version can be newer though. You can install ISPConfig (e.g. in single server mode) but you don't have to.
    2) Disable server.sh and cron.sh root cronjobs on the old server to prevent that ISPconfig communicates with the master node.
    3) Run ISPCopy on the old server and let it move the ispconfig installation to the new system.
    4) Run a forced update of ispconfig on the new server, let it update permissions in master database to connect the new node to the master and let it reconfigure services to update and write the config files.
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I thought about ISPCopy aswell, but due to the note on misconfigurations, I think the migration tool would be better, because it leaves out the config - or am I missing something? :)
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The Migration Tool should indeed be used in cases of config issues. But as far as I understand the setup of the original poster the old and new system are connected to the same master? If that's the case, then the Migration Tool can not be used. using teh Migration Tool would be as if you try to copy a file onto itself, it would try to import data into the same master that exists in the master already.
     
    Th0m likes this.
  10. nhybgtvfr

    nhybgtvfr Active Member

    well i can think of a third use case scenario where neither a straight migration or ispcopy appear suitable.
    moving an existing multiserver member server (non-master) from one multi-server setup into another multi-server setup.

    eg, two companies in using the same datacentre merge. both use ispconfig multi-server, and want to merge the two separate ispconfig setups into one system. so maybe now they want to remove one physical webserver from ispconfig system a, and add it to ispconfig system b, whilst not losing the websites already configured and running on this webserver.
    obviously they could setup another webserver on system b, use the migration tool to migrate everything from the old webserver to the new server ( and migrate dns data ).
    but for this argument, let's assume they don't have another physical server, or the spare time/cash to buy/rent one, or use a vm/vps as an intermediary migration server to temporarily run the sites whilst the old server is re-installed/reconfigured.
    they now need some way to have all the user data migrated from ispconfig system a to ispconfig system b. have the webserver remove itself from system a, join system b, update all the system ids, user ids, etc in it's own dbispconfig database with the id's from its new master. then rebuild it's /etc/passwd /etc/group files, and update all the owner/group settings on all the websites it hosts.


    not saying you need to rush out and develop a new migration option, it's a scenario that will likely only occur very rarely, so may be something to consider for the future.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    This can be done with the Migration Tool.
     

Share This Page