How to unlink slave server from multiserver configuration

Discussion in 'Installation/Configuration' started by Lorisg91, Dec 3, 2021.

  1. Lorisg91

    Lorisg91 New Member

    Dear support,

    I have a multiserver setup and I would know if it's possible to unlink one of the slaves servers by keeping the data. In this case it's a mail server with many domains declared on it, and I want to make this server a standalone server, but I want to keep all the configuration.

    I have cloned the VM and started the ISPconfig update but it asked me the MySQL master server hostname directly. Could you please help me to solve this ?

    Thank you for your help.
    Best regards.
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I've never done this, but the steps would more or less be:

    - make an extra copy of your vm clones (master server and slave server) so you can start over if needed
    - after cloning the slave, dump the database from the master server and import that as the dbispconfig database on the slave
    - you can then (or later if preferred) delete all those email domains from the master (and anything else, as needed), and delete the old slave server under System > Server services (and anywhere else it would still exist)
    - in the old slave/new standalone server, edit ISPConfig's config.inc.php in both /usr/local/ispconfig/interface/lib/ and server/lib/ to set server_id=1 and delete the dbmaster host/port/user
    - in the database on the new standalone server (old slave), delete all entries from the server table except for server id 1, and change the values for id 1 to be appropriate for the new standalone server (hostname, mail settings, etc.)
    - update firewall (I think 'iptables' table) for server_id 1 with full set of needed ports, and delete rows for other server id's
    - update or delete server_ip and server_php tables so only server id 1 exists, with correct values
    - still in that database, change the server_id column in all other database tables to be "1"
    - install any missing software on the new standalone server per the Perfect Server guide (eg. you might need a web server, more php packages, etc.)
    - I'd probably make another quick clone/snapshot at this point, then run the ispconfig updater to reconfigure services
    - login to the ISPConfig interface (eg. port 8080 by default) and clean up "everything" (delete websites, dns zones, etc. .. everything but your email domains, it sounds like)
    - tools > resync (everything)
    - change email related dns records for the domains to use the new server
    - you might be done, test everything, troubleshoot and fix whatever was missing
     
    Last edited: Dec 3, 2021
    ahrasis likes this.
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I would use the migration tool to migrate the server and client records to a new standalone.
     
    Jesse Norell likes this.
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Well, ok, that would be easier. :)
     

Share This Page