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 ;)

Share This Page