Best practice for migrations

Discussion in 'ISPConfig 3 Priority Support' started by Nilpo, May 4, 2024.

  1. Nilpo

    Nilpo Member HowtoForge Supporter

    I'm going to be moving a single server (Perfect Server CentOS 6) to a multi-server (Perfect Multi-server Debian 11).

    What's the best practice for accomplishing this in regards to not losing emails?

    Is there a "maintenance mode" on the source server? Can I just shutdown postfix, for example?

    If I wait to point DNS to the new server until the migration completes, mail that is delivered in the interim may not make it to the new server if that portion of the migration has already completed. If I point DNS immediately, new emails will be delivered to the new server before the accounts are transferred.

    So it seems to me that putting the first server into a "maintenance mode" or read-only state is the best approach. I have roughly 30-40 GB of website and mail data to be moved. This will take a little time.
     
  2. Nilpo

    Nilpo Member HowtoForge Supporter

    I just found this post.

    It looks like the process is:
    1. Run a dry migration using the "dry" option in the migration tool.
    2. After a successful dry run, run the actual migration.
    3. Test the new server config, websites, etc.
    4. Point DNS to the new server(s).
    5. Re-run the data migration using "./migrate --syncjobs".
    Since the migration tool uses rsync under the hood, it should sort out what mail files don't exist on the target mail server and copy just the missing ones.

    Since DNS can take some time to propagate, I'd also suggest running the data migration a third time after a few days have passed just to be safe. YMMV.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The steps look fine to me.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I would use HAProxy to forward traffic directly after migration. This is what I do for all migrations I do for clients.
     
  5. Nilpo

    Nilpo Member HowtoForge Supporter

    I'm looking into this. Thanks for the tip.
     
  6. Nilpo

    Nilpo Member HowtoForge Supporter

    I've reached the portion of the migration tool that asks for the destination server for the database.

    Is this asking about the ISPConfig database (which I presume would be best put on the master "panel" node) or the web databases which should go on web01 or a dedicated database server?

    None of these sites will scale up much. I had really just assumed I'd put website databases on individual webserver nodes. Although a dedicated database server isn't out of the question although it's not addressed in the tutorial.

    But my question remains. Is this asking where to put all existing databases since I'm going from single server to multi-server?
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Can you cut and paste the exact question the tool asks? Or screenshot?
    I do not remember now what tool asks about the database, but when I did the migration it was clear what needed to be done.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess it asks where the website databases shall go. But best is to post the exact question like @Taleman suggested to ensure we do not accidentally instruct you incorrectly.

    I would always put the databases of the websites on the same node that hosts the websites unless you host one big website that scales through multiple servers. The reason for putting the databases on the web nodes is that it allows the PHP of the websites to access the database locally via a socket, which is way faster than connecting to the database over the external network interface.
     
    Th0m likes this.
  9. Nilpo

    Nilpo Member HowtoForge Supporter

    My thought exactly.
     
  10. Nilpo

    Nilpo Member HowtoForge Supporter

    2024-05-10_03-37-52.png
     
  11. Nilpo

    Nilpo Member HowtoForge Supporter

    Additionally, the wizard seems to duplicate questions also. After selecting all of the servers (and entering IP addresses earlier), I'm later given two more prompts as shown. Shouldn't these questions have been answered already? 2024-05-10_03-41-34.png
    2024-05-10_03-44-37.png
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You chose importing database to the Panel host. Like Till wrote in #8, web01 would give better database performance.
     
  13. Nilpo

    Nilpo Member HowtoForge Supporter

    This is why I was asking. There doesn't appear to be a way to separate web databases from the ISPConfig database. If the panel server is the master node, the two need to be separated. Otherwise it makes more sense to make the web01 server the master. But then I don't have the separation of concerns I was hoping to achieve with a multi-server set up.
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Every ISPConfig host runs it's own copy of dbispconfig.
    If host panel is the master, then it has the master dbispconfig.
    If you put website databases on web01, then they are not on the same host as the master dbispconfig.
    Every website has it's own database and database user, so databases are always separated and separated from dbispconfig.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Regarding #10:

    Check under System > server services in ISPConfig that the web nodes are also database nodes, the checkbox "DB-Server" must be enabled. If that's the case, then the Migration Tool will offer you the web server as a target for the website databases.

    Regarding #11:

    I'm not aware of any duplicate questions, the screenshots you posted are for different services (mail and web).
     
  16. Nilpo

    Nilpo Member HowtoForge Supporter

    This is different from "mail accounts" and "websites"?
     
  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    There is confusion somewhere.
    Surely mail accounts and websites are two separate things. Also surely web server and mail server are two different things.
    I do not understand what you are actually asking.
     
  18. Nilpo

    Nilpo Member HowtoForge Supporter

    The migration tool asks you to identify the mail server IP address. It then later asks where it should should move MAIL ACCOUNTS. (Isn't this the same thing.)

    Likewise, it asks you to identify the webserver, and then later asks where to move WEBSITES. (Aren't these two also the same thing?)
     
  19. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    That's not how it works. The ISPConfig database itself is never migrated - the individual entries are recreated through the API. The migration toolkit only migrates the databases that have been created through the ISPConfig UI.

    No. The IP address is for migrating the data itself through rsync, the other question is to check on which server the mail accounts have to be created.

    If you need professional help with your migration, you can reach out through https://www.ispconfig.org/get-support/?type=ispconfig and I'll be happy to help you out.
     
    till likes this.
  20. Nilpo

    Nilpo Member HowtoForge Supporter

    Oh, that would make sense.
    Thank you for the clarification. I think I'm all set now.
     
    Th0m likes this.

Share This Page