Serverbreakdown (Slave Server on Multiserver Setup)

Discussion in 'ISPConfig 3 Priority Support' started by crazyiven, Jan 8, 2014.

  1. crazyiven

    crazyiven New Member


    My Server2 had a hdd crash and is part of my multiserver setup of ispconfig. My mainserver with ispconfig panel (Server1) is up & running ... just server2 is down. I've a complete hdd backup right befor the crash and wanna know:

    Is it possible to reinstall & resetup Server2 with the settings from Server1?

    I mean, is there a function to reinstall all data (Domains, FTP Accounts, E-Mail Accounts, MySQL Databases ...) with the "old" settings & passwords? And when this process is ready i could copy the files on the right folders and all is up & running again?

    Kind regards
  2. crazyiven

    crazyiven New Member



    Leider hilft das ISPConfig Handbuch bei folgendem Problem auch nicht:

    Server2 (Slave von Masterserver Server1) hat einen absoluten Festplattenschaden und muss neu installiert werden. Ich habe einen aktuellen Dump der Festplatte (somit alle Daten & Backups vorhanden) und nun frage ich mich:

    Wie bekomme ich diesen Server wieder so ins ISPConfig dass z.B. die E-Mail Konten wieder mit den Passwörtern eingerichtet werden die sie vor dem Ausfall des Servers hatten? Kann ich irgendwo nen Hebel umlegen und sagen "Neu anlegen" oder so? Und wie binde ich den Server wieder ins ISPConfig ein? Einfach mit denselben Daten (Hostname, IP usw.) neu installieren? Weil die Daten des Servers sind ja eigentlich schon vorhanden?

    Eine Hilfe wäre sehr hilfreich, denn das Handbuch kann da leider nicht wirklich weiterhelfen

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    cant you just restore the full server from your backup?

    If not, the following procedure should work:

    1) Install the new server with ispconfig in the same way you installed the original server and attach it to your ispconfig master server. ensure that you install the same ispconfig version that is used on the master.
    2) The newly installed server will show up as additional server in ispconfig now. To fix that, login to phpmyadmin and delete this new server record in the "server" table of the ispconfig and then note down the server_id of your old mailserver. (if its a 2 server setup, then the id is most likely 2).
    3) Now edit the file /usr/local/ispconfig/server/lib/ on the slave and change the server_id in that file to the ID of the old mail server. then download ispconfig tar.gz again, unpack it and run the update.php script which is in the install folder and choose to reconfigure services. This step will update all config files of the new install to use the same server ID that your old mail server had.
    4) Now its time to restore the backup:

    - backup the dbispconfig database on the slave (just to be sure) and replace it with the one from your backup.
    - Restore all files and folders to /var/www and /var/vmail. If the server runs mail only, then just restore /var/vmail

    5) as last step, login to ispconfig on the master, go to tool (in german: Einstellungen) resync, enable the checkboxes for all services that are run on this slave (e.g. if its a mail only server, then just enable the mail checkbox) and start the resync. ispconfig will then run a update on all mailboxes and will create missing files.
  4. crazyiven

    crazyiven New Member

    Unfortunately I can't do a fullrestore, we think there is something wrong with the mainboard (3 Months ago one HDD broke down) so we'll switch the complete server.

    Thanks for your help, server2 had mail, web & database but i get your point of asking this :)

    Lets hope all works to plan! And thanks for your great support ... I've bought the ispconfig manual by hand and now the subscription. You're the best! ;)

    Kind regards
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    For the mysql users: It might be that the resync is not able to create them on the new server. in this case, resore a copy of the mysql.mysql database from your backup into a (temporary) database, then export all mysql users of the websites (tables User and DB, but only the users of the website databases, not the ispconfig or root user) with phpmyadmin as sql and then import them into the mysql "mysql" database and reload mysql.
  6. crazyiven

    crazyiven New Member

    Hey ;)

    Just a small Update ;)

    Your tutorial worked great, just one small problem. My first attempt with the update.php failed, cause the local dbisconfig database had the wrong server_id. So ist first restored dbispconfig database and then did the update.php call. All worked fine :)

    The system synced web/mail and i just had to copy users/db from old mysql table to new mysql table ... quick restart and all is up & running. All passwords are still correct and all customers are happy :)

    Thanks for your great support!
  7. crazyiven

    crazyiven New Member

    Small Wish/Hint

    I've a Multiserver Setup with 8 slaves ... It would be nice to have a server selection within the synctool. I've to wait till all 8 slaves had synced ;)
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I've added it to the bugtracker :)

    The sync happens simultaniously, so it will not take longer for 8 slaves. But its not nescessary to resync the others off course.
  9. crazyiven

    crazyiven New Member

    Great thanks ;)
  10. muekno

    muekno Member HowtoForge Supporter

    Followed the instructions above, got the folowing
    Need help, using latest ISPCONFIG 3.1

    Thanks Rainer
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    This indicates that the server config (the data that you find in ISPConfig under System > Server config) on the master is damaged or unreadable so the updater stops here to ensure that it will not damage the system. This data is stored in the "server" database table of the ispconfig database, it is in ini format stored in one of the field (the name of the field is config if i remember correctly).
  12. muekno

    muekno Member HowtoForge Supporter

    config field of the master server can't see no damage
    config of new server can see no damage
    The crashed and new setup server should do mail and primary DNS
    The system page on ISPCONFIG System looks OK
    Monitor on ISPCONFIG shows all green
    Should I try the SYSN

  13. muekno

    muekno Member HowtoForge Supporter

    To clarify the config is the original of the crashed server, new added record for the new server was deleted as requested above.
    SQL communication should be ok, as monitor could see the running services and the server could be successfully added
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The server_id in the config files matches with the record of that server in the server table on the master?
  15. muekno

    muekno Member HowtoForge Supporter

    Yes but I found
    $conf['dbmaster_user'] = 'ispcsrv5';
    $conf['dbmaster_password'] = '1a8765d6ed9e0484d4e825ddccfb3b85';
    may still be wrong, the new server had ID 5 the old had ID 5 so in /usr/local/ispconfig/server/lib/ I changed it to 2, but shouldnt be the db_master_user and db.aster_password changed too.

  16. till

    till Super Moderator Staff Member ISPConfig Developer

    If you change the ID then you should change the user and password as well.

    Both had 5 and you changed it to 2?
  17. muekno

    muekno Member HowtoForge Supporter

    I only changed the server id till yet, as described in the 3rth post in this thread, so do I understand you right, I have to change user and password as well, as I asumed. From where do I get the old password.

    Thank you

  18. till

    till Super Moderator Staff Member ISPConfig Developer

    The username and password must be working, if the current ones work, then you don't have to change them, just test if you are able to login with that username, password and server hostname with the mysql command from the slave server to the master.
  19. muekno

    muekno Member HowtoForge Supporter

    Username and password are working , so we are at the old problem, updates stops

  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Copy the record with server_id = 2 from master server into the local database of the slave.

Share This Page