migration tool and multiserver setup question

Discussion in 'Plugins/Modules/Addons' started by Tomislav Aurednik, May 9, 2017.

  1. I've just purchased the migration tool. I want to migrate from a multiserver setup to a single/multiserver setup.
    Old servers
    • server 1: web&db master server with ISPConfig 3.0.5.4p9 interface
    • server 2: mail server
    • server 3: dns1 server
    • server 4: dns2 server mirror of dns1

    New servers
    • server 1: web, db, mail, file master server with ISPConfig 3.1dev interface
    • server 2: dns1 server
    • server 3: dns2 server mirror of dns1

    In the README it only says to copy the migration tool to the SOURCE (the server with the data). So to which server should I copy? Only the master or on every server from the old setup and run the tool on every old server? Need to backup all my data before I run the tool. So I haven't tryed it yet.
    Do the old servers need to know the new ones by hostname ( need to add them to vi /etc/hosts) or are private/internal IPs enough?
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Hello,
    in theory it would be enough to run on master (source) because it contains all the information that is needed for creating websites, clients etc.
    BUT: the generated commands_xxxx.sh file that needs to be executed on the target afterwards will only contain those data where you ran the migrator on (source). So it is neccessary to run the script on all source servers that contain data, in your case all of them except the dns mirror. Please run it on the source master first, then on each other source, except the dns mirror.
     
    Tomislav Aurednik likes this.
  3. Thanks for the info!
     
  4. Can't get it to work even on a dry run! I have a multiserver setup so I don't have /var/vmail folders on my web server!

    Please give your base path for mails on the source server (e. g. /var/vmail) or hit Enter for default settings: [/var/vmail]:
    Invalid path.

    How can I get it to work???
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That is a "feature" in the migration tool. It asks that question even on hosts with no e-mails. To get it to work, just give a pathname that exists, /tmp or /var/tmp or /var/www for example.
     
    Tomislav Aurednik likes this.
  6. That worked. But my migration failed!
    It started to migrate clients. It migrated 26 out of 32 clients and it stopped with the message.
    Could not create client <client_name>

    It's the 1st client that has data in fields vat_id, street, city,... . Can this be the problem?
     
  7. Removed the additional info from all clients and run the tool again, selected the option to update the clients if they exist and it created duplicates! By now I would probbably be half way done with manually creating the clients.
    How can I easy clean up this mess?
    It created the db users and db, but they are empty. Are they going to be copyed with the bash script or do I have to manualy export/import them?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The new ISPConfig does not accept Finnish VAT ID. I had to null that field for all clients to get clients migrated.
    I also got duplicates once, that question is somehow confusing and I answerd it wrong. I just removed by hand the extra clients.
    The databases and web files are copied over when you run the generated command files on the TARGET servers.
     
    Tomislav Aurednik likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The data gets copied by the bash script.

    And as @Taleman pointed ou, ISPConfig checks the VAT ID's against the European VAT ID database, so you can import only valid EU ID's into a recent ISPConfig version. If your old installation contains other vat ID's, then you have to remove them first or empty the fields with a sql query.
     
    Tomislav Aurednik likes this.
  10. I fed up something again. It didn't copy the databases.
    mysqldump: Got error: 1045: "Access denied for user 'b749b50bd7a420fe'@'xxx.mydomain.si' (using password: YES)" when trying to connect

    Did I missed something? The prompts said only to comment out the bind-address. Do I need to create a db user for connection like on a multiserver setup? But isn't the db username randomly created?
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    That problem occurs when the ip the target uses to connect to the source is different from the "public target ip" you provided during migration. The migration tool creates a read only user with 'randomname'@'ip-provided' on the source. Please create a user with the username and password contained in the command script but with the ip that the target uses to connect to the source.
     
  12. It didn't use the IP but the hostname. Is this because I've got the IP and hostname in hosts so I can ping the servers by hostname?

    OK... looked at the db user and changed it. Now I just need to run it again to see if it works.
     
    Last edited: May 11, 2017
  13. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    I mean that the migrator requests you to input the ip of the target server in one step and it uses that one to create the database users. This is why you get the access denied. Maybe we should change it to 'randomuser'@'%' which we did not due to security reasons.
     
    Tomislav Aurednik likes this.
  14. It completed and copyed the databases. Now it's time to attack the mail server.
     
  15. Ok I've migrated the webserver. Now I want to migrate the MAIL server. I run the migration tool on the mail server, I didn't need to specify the mail folder. For the option "Import reserved usernames" I selected NO because I've allready imported all clients from web server and it created the maildomain folders in /var/vmail.
    Now I've got 2 questions.
    1. Will the script delete my websites, websites DB, ...? The migration script for web dropped my tables and then copyed them over again!
    2. Does it preserve my mail on the SOURCE server, so those clients that have IMAP won't loose any mail?

    I'm still testing the new servers so the production (SOURCE) need to run with no problem that is why I rather ask before I run scripts.
     
  16. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    It will create, what exists on the source server in the "dbispconfig" database and won't touch the rest. So if this is a ISPConfig slave with mail server only, then it will only create mail-related things.
    Yes, the command script created uses rsync to copy the data from source to target. As it is run on the target it does not touch the source.
     
    Tomislav Aurednik likes this.
  17. Thanks Croydon it worked as you said!
     

Share This Page