Migrate mail slave to new master.

Discussion in 'General' started by Chris_UK, Sep 29, 2019.

  1. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    I want to migrate a slave mail server to a new master. Its current master is offline but not dead, I know that I can run ispconfig_update.sh and attach it that way, but I have mail accounts set that would not be in the new masters database.

    Can you tell me exactly which tables I need to export from master1 and import to master2 to have this single server reattached? I will be running ispconfig_update.sh after this step so its credentials will be handled there.

    I presume I will need to update the slaves database, server id in some tables too?

    thanks in advance
  2. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    No matter, I have figured it out, its all the mail tables that contain anything with the server_id of the mail server, and anything that for mail domains etc etc once you see it all in phpmyadmin by activating a root user, this allowed me to browse the mysql database and the ispconfig without needing to switch users.

    Replacing an id that is auto inc in the table with '' means a new id is generated when you insert it into the new masters database and you have to edit the server ids on the mail servers local database too to reflect these new ids, however, if the server id is not used already and you can live with a gap in your server ids, (no ocds here ;) ) on the new master you do not need to change remove the ids at all.

    You will also need to copy any users relating to the mail server in the 'mysql' database, You can find out its username by opening ./usr/local/ispconfig/interface/lib/config.inc.php look in the section relating to the master. After you have made the changes you may need to flush privileges on the masters mysql server or restart the mysql server. Hopefully this will help somebody in the future. I will try to come back with exact steps if I get time.

Share This Page