Master server reinstalled after data loss

Discussion in 'ISPConfig 3 Priority Support' started by medo, Dec 25, 2015.

  1. medo

    medo Member

    Hi,

    One day, one problem...

    I have lost my master server (userdel -r -f on a user that had / as home directory...)
    Now I have reinstalled it, recovered my dbispconfig database (1 day lost), stopped cron on slave servers.
    I have tested root access to my mysql on master from my 3 slaves. (mysql account + fw rule recreated)
    What are the steps that I should take in order to make my master server (used only as a manager for my clients) functional again ?

    Thank you very much.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you recover all databases (ikl. the mysql.mysql database of the master which contains the mysql logins) or only the dbispconfig database?
     
  3. medo

    medo Member

    no, not the mysql, just the dbispconfig.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok,so currently all the ispcsrv* users are missing in the mysql master. Thats the users that the slaves use to fetch data from the master.

    Please download the ispconfig tar.gz on one of the slaves, unpack it and run the update.php script in the install folder. when the installer asks you to reconfigure the mysql users on the master server, choose yes. When the update is finished, check on the master server if the ispcsrv* users exist now.
     
  5. medo

    medo Member

    done, it has recreated the the ispcsrv6 user on the master database, so I have to do that with all my slave servers ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes.
     
  7. medo

    medo Member

    It all went fine, is that all ?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    If the servers are working again, then thats all.
     
  9. medo

    medo Member

    No error messages anywhere, but none of my changes are executed on my slaves.
    My old master server was apache and my new one is nginx, so I changed the settings in the "server" table, "config" value, so ispconfig knows that it is running on nginx now.
    Any idea on what I have missed ?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. medo

    medo Member

    Nothing shows in the debug, the script ends normally with "Finished".
    So I started debugging the script and the problem is the datalog as I have lost 1 day operations on my master server (the database was 1 day old) so the last_datalog_id > max (updated) for each of my slaves (for the moment)

    How to smoothly get out of this situation ?
     
    Last edited: Dec 27, 2015
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The last data log Id is stored in the master database only, so there should be no differences. But you can adjust the updated column in the server table on the master if necessary, it contains the last processed I'd for a server.
     
  13. medo

    medo Member

    all good, I had to change the updated column on the slave servers because the latest datalog id on the master was lower than the updated column on the slaves, so slaves wouldn't execute lastest commands from master.
    commands are now executed on slaves, hope I won't have problems later with this change because some of the operations that were executed between the restore of the master and now are lost on the master.

    thanks anyway.
     

Share This Page