new multi server setup to use with migration kit question

Discussion in 'Installation/Configuration' started by ShaferTech, Sep 21, 2023.

  1. ShaferTech

    ShaferTech Member

    Currently have two servers in DO. primary is running everything. Second server is just dns secondary for a second NS. - all ispconfig services (panel, http, mail, dns) panel and dns

    Setting up two new servers using the guide and had a question.

    With the new servers, I was planning to have the slave replicate everything from the master so it can be ready to go should the primary fail, and not just dns. Should I just install the primary (it's already installed), use the migration kit to copy data/setup from the old primary, and then add the secondary as a slave for all services and let it replicate? This seems to be the way to go to get a full secondary server instead of just dns. - ispconfig primary (panel, http, mail, dns) - ispconfig secondary (replicate everything from
    Last edited: Sep 21, 2023
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    that's quite an old guide, and it's basically setting everything up show certain services run only on specific servers.

    you can install a new full standalone server, ie one with all services running on it. and then create another server, and install all services on that as well. and you can make this 2nd server a mirror of the first. that way, any sites, dns, mail, databases etc configured on the 1st server will also, automatically, be configure on the 2nd server.

    however.. even having done this, you still need to keep all the data in sync..
    email should be ok, i believe @Th0m's done an install guide, where mailboxes on mirrored mailservers are synced using dovecot.
    you will still need to sort out syncing website files ( i believe some guides show using unison for this ) or create shared storage.
    it will also require more effort/configuration for certificates. and database replication.

    and the interface, if installed, on server 2, would still be writing any changes to the master database on server 1.

    i don't know if any of the guides for creating a clustered ispconfig install have been updated for the latest OS and ispconfig releases,
    but you should probably be looking at one of those instead, and adjusting that to account for any more recent installation step changes.
  3. ShaferTech

    ShaferTech Member

    Ah ok... just assumed the secondary would sync all info (included sites and email). If they don't that's fine.

    I was more curious if i should just migrate to the new server i've setup and add the secondary after... or if there was a more ISPConfig way to do the migratioin of primary and secondary.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You must add the secondary server first before migration. The secondary server syncs its config via ISPConfig, but you must take care to sync data by providing a shared or synced storage for /var/www and use e.g. dovecot sync for email.
  5. ShaferTech

    ShaferTech Member

    ran the migration script. everything came over.
    Any way to mass update IP's in DNS?
    the old server was the dns server, so all of the dns entries still point to the old server. Anyway to mass update that with mysql or a script?
  6. ShaferTech

    ShaferTech Member

  7. TonyG

    TonyG Active Member

    I am getting ready to get the Migration Tool and use it to migrate From (primary-old) v3.2.2 over Ubuntu 20, To (primary-new) v3.2.11 over Ubuntu 22. There is currently a "secondary-old" DNS/Mail server configured with primary-old, but the configs are rubbish and the server needs to be replaced in its entirety.

    When I migate primary-old to primary-new, can I do so without the secondary-old? Or must I "add the secondary server first before migration", migrate, then de-configure secondary-new and create a "secondary-v3" to become the new properly configured system?
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    what do you mean by 'the configs are rubbish' ? the server configs, or the client/mailbox configs?

    using the migration tool, you migrate the client configs and data, not the server configs.

    also, just because you have a secondary server on the old system, doesn't mean you have to have the same number of servers on the new system, or that each server runs the same services.

    eg, if you have an old primary, running the interface and dns.. a second server running webservers, databases and mail. and a third server running webservers, databases and mail (different clients, not mirror of second server). on the new system, you can have just two larger servers, the primary running the interface, dns, websites and dns. and a smaller second server just running mail.
    you can migrate all websites, dns and databases from both old server 2 and 3 to the new primary, and migrate mail from the old servers 2 and 3 to the new server 2.
    ahrasis likes this.
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    He actually referred to my new guide ;)
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    my bad.. just saw ubuntu 20.04 and debian 10 in the title and assumed it was an older tutorial.
  11. TonyG

    TonyG Active Member

    It's the server configs - something happened in the comms between mx2 and mx1 and it's led to a cascade of issues. This could have been induced by normal OS updates, my manual implementation of Rspamd (before it was added, thank you guys!), maybe due to automated changes in IPTables, or maybe my own negligence from not watching logs properly for issues. For whatever reason, the boxes aren't doing what they need to do, and I will be very happy to replace them both with new hardware, new OS, and a fresh ISPConfig installation.

    On topic with this thread, I'm relying heavily on the updated Perfect Server guide for Ubuntu 22.04 and the multiserver docs to which that links, which still say 20.04. Those not-so-perfect docs are out of sync, and a lot of care needs to be put into re-re-re-re-reading, and accounting for minor inconsistencies that become important. @Th0m - I'll be happy to share notes with you on this, unless you already have something new in progress.
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    @till can you update the name? it also works for Ubuntu 22.04, Debian 11, and Debian 12.

    From my experience the guide works fine on the newer operating systems. If it does not, feel free to share your experience(s).
    ahrasis likes this.
  13. ShaferTech

    ShaferTech Member

    Backed up, punted. started over.
    Followed this guide:
    Remove /root/ folder.
    Installed certbot.

    Panel came up like it should have, had all the services isntalled (postfix, dovecot, apache, etc).
    Ran migration.
    Everything copied over.

    Problems i'm having now that i've spent all day trying to track down.
    1. Certs dont' always issue for sites. sites that had certs previously and those certs copied over. If do a certbot -d --force-renewal they work. Until i save a change to that site in panel interface. then the cert is broken again.
    2. Auto www. isn't working. and it's breaking sites with certificates. If i add the www to the url in a browser, they come up and use their cert. A work around i've found is to use the seo redirect -> This was working previously.
    3. A codeigniter codebase that worked previously isn't working now. I think it needs mod-php, it's older. Adjusting the php version to 7.2 and even 5.6 doesn't change anything. Returns a 500 server error and there's nothing in the sites log or global log, nor the php fpm logs.
  14. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I can see your first step in creating new ISPConfig server is wrong already. You should use certbot param if you want to use it instead of, not by removing thereafter just like that i.e. without force updating ISPConfig again and reconfigure all services. When you do it that way, ISPConfig may still think is your LE client and that could lead to the LE problems you were facing.
  15. ShaferTech

    ShaferTech Member

    Fixed #3. had to recreate the site in the panel, changed to php7.2 and it finally started loading properly.

    Still very concerned about #2. #1 i can create my cronjob to run certbot for renewal if i need to. i'd prefer not too.

Share This Page