New master for the slave

Discussion in 'General' started by Toucan, May 18, 2011.

  1. Toucan

    Toucan Member

    This thread is split from to deal with new master aspect.

    Having had the Master in a multi server setup die, I have now built a new master with ispconfig 3 on debian lenny using exactly the same details and host name as before.

    I do have a copy of all the old databases and files on the old master. What databases do i need to import again into the new master for it to 'remember' all the records it had before and start behaving as the master of it's slave?

    It's not imperitive it remembers it's own records vhosts and mail accounts but it must be able to take over as master of the slave again to administer it.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Import the ispconfig database (its just one mysql database) plus the permission records of the Mysql "mysql" database for the mysql users of the slaves.
  3. Toucan

    Toucan Member

    Thanks. Should I completely drop both databases and replace with the back ups or import the additional records?

    I did try this yesterday with other experiments and all appeared to work, but as soon as I made any record changes in ispconfig it seemed to loose communication with the two slaves.

    After messing about with it too much it's now completely locked me out the control panel.

    Just so I'm clear when I do it later, I could do something like this:

    Mysql etc

    Drop database dbispconfig;
    Create database dbispconfig;
    dbispconfig < myispconfigbackupfile.sql;

    And then exactly the same for database mysql


    Thanks for your help. I'm desperate to get this online again by the weekend.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, thats different for both databases.

    1) ISPConfig database: drop it and replace it with the db from the backup.

    2) mysql.mysql Database: export only all ispcsrv* users from all tables in the mysql database and import them in the database on the new server.

    Please make backups of both databases on the new server before you start, so that you can restore them in case that something goes wrong :)
  5. Toucan

    Toucan Member

    I was with you up till the second point...

    Are you suggesting I import the old mysql database into a new database and then export all ispcsrv records and then import them into the new master mysql database? Use phpmyadmin for this process?

    Are these user records scattered across several tables in the mysql database?

    Sorry for all the questions, I know I'll need the answers tonight when there's nobody on hand to ask.

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I would export the mysql user records of the ispcsrv users from the old Databse with phpmyadmin.

  7. Toucan

    Toucan Member

    Thanks. That seemed to work. At last I can sleep at night.

    Now stage two is mail and web recovery. I'm fairly happy with recovering the websites.

    But, is it possible to recover the old messages? I tried copying the content of vmail for mailbox for a user to the new server but that reported some horrible results when viewing the imap folder in squirrel.

    Any ideas welcome?
  8. Toucan

    Toucan Member


    when vmail directories were recovered they were done with root user changing ownership.

    chown -R vmail:vmail /var/vmail/

Share This Page