Migration Toolkit: From Cluster to Multiserver

Discussion in 'ISPConfig 3 Priority Support' started by stefanm, Jun 15, 2020.

  1. stefanm

    stefanm Member HowtoForge Supporter

    Hi,
    sorry if this was answered already, but I didn't find it.
    I am trying to understand how to use the new command options of the migration toolkit. It was quite some time ago that I used the migration toolkit the last time and meanwhile it obviously got many improvements and new features.

    At the moment I have a small, old two-node ispconfig cluster (Debian 8, ispconfig 3.1), while it is actually one real node (master) and one backup node. This server has web sites, databases, and mails.
    This must be migrated to a new multiserver setup (Debian 10, latest ispconfig) with one "management" server running all administration panels (ispconfig, phpmyadmin, rspamd,...), one mail server, and five webservers. All mails from the old server are migrated to a single new server in the multiserver setup, the websites/databases must be migrated to different webservers.

    So, I have some small questions: How does the migration tool determine which target server to use? Would these be the right steps:
    1. migrate --only=client to migrate all clients without data to the "management server"
    2. migrate --only-web=<domain.com> one after the other to migrate the web sites and the associated databases to the designated webserver
    3. migrate --only=mail to migrate the mail accounts to the mail server
    From step 1 to steps 2 and 3: I guess on the new servers, clients might get new IDs. Does the migration toolkit keep track of the client<->web, client<->mail connections if I only migrate the clients on the first step?

    On the new servers I have different PHP versions than on the old server. I guess I need to configure this manually after migration?!
    The last time I used the migration toolkit, shell accounts had to be migrated manually. Is this still the case?

    Thanks a lot for your help and the great work with both ispconfig and the migration toolkit!
    Best,
    Stefan
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The question is if you will have multiple distinct web servers on the target cluster. If not, then you do not need any of the command line options as you will be asked which target server shall receive which services (mail, web, database …).
    If you have multiple web servers it is a bit more complicated. The --only-web option is to migrate single websites including their dependencies (client, ftp, database) but if the source system is old there might be missing links between those data and the dependency check might not be able to get everything that is needed.
    In addition the "resync" is a bit more complicated as the option --syncjobs will only sync data from your last migrate run. So if you use --only-web multiple times you need to always save your resulting syncjobs.dat so you might be able to resync data later on.
    The --only=mail or --only=client will not be needed at all in both cases.

    The migtool will ask which PHP version to use on the new server for each source server's PHP version.
     
  3. stefanm

    stefanm Member HowtoForge Supporter

    Hi Marius,
    many thanks for you detailed answer, it is highly appreciated!
    I hope you don't mind if I have two more questions for clarification. Indeed, the web sites from the old server are to be migrated to 5 new servers, so I have to migrate them one after the other.
    You wrote that the "--only=client" part is not necessary. Do I get this right that the clients are always migrated if they do not exist on the target server yet?
    Can I migrate websites of one client subsequently, e.g. say I have
    clientxy with sites a.com, b.com, c.com
    When migrating with "--only-web=a.com" as the first site of clientxy, I guess the clientxy is created automatically on the target server. Can I later migrate with "--only-web=b.com" and the migration script "knows" that clientxy is on the target system already? I seem to remember from earlier uses of the migration tool that clients might get new IDs when being migrated, but my memory might be wrong on this. Does the migration toolkit "know" what clients on the source system are related to which clients on the target system?
    Besides, you wrote that "--only=mail" is not necessary. The mails from the source server shall be migrated completely to a single target server (of the multiserver setup). If I migrate the web sites first and then all the mails in one step afterwards, does the migration toolkit know that all the web sites have been migrated before so it won't try to migrate them again or do I need to migrate the mails explicitly?

    BTW, thanks for the hint with the syncjobs.dat. This is very valuable! I think I will not need to sync the web sites multiple times, but very good to know that I should keep a copy of the file for websites where a second sync might be needed.

    Thanks again for taking the time to answer my questions!!
    Best,
    Stefan
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The migration tool does it's matching of clients by username. This means if you migrate a single site first and a second one of the same client later, the client data on the target would be updated with the state from the source.

    Normally it would be enough to just say --only-client=123 if you want to have all sites of the same client on the same target web server. But - again because of problems with dependency resolving - this does not always work as intended and has to be verified by using --debug and a dry run and check the migrate.log if really only that single client and it's data would be migrated.
     
    stefanm likes this.
  5. stefanm

    stefanm Member HowtoForge Supporter

    Many thanks for your help!
     

Share This Page