Server Wiederherstellung aus Backups

  • Hallo,


    Vorabinfo:
    OS: Ubuntu 16.04
    i-MSCP: 1.4.7


    ich teste gerade die Wiederherstellung aus den von i-MSCP angelegten Backups.
    Server Einstellungen, Benutzer, Domains und entsprechende Ordner werden auch wieder hergestellt jedoch legt das Setup die Datenbanken und Benutzer nicht wieder an.


    Weiß jemand ob man i-MSCP dazu bringen kann das noch zu tun? autoinstall -r all hat nichts gebracht.


    Falls nicht baue ich mir noch ein Script das diese Aufgabe übernimmt.


    Grüße
    Tobias

  • Die Datenbanken der User werden auch nicht durch das Setup von i-MSCP recovered.
    Da musst Du schon in jeden Webspace gehen und wiederherstellen.


    Was genau hast Du denn alles gesichert?


    Btw.. Die Grants der einzelnen Datenbankbenutzer musst Du manuell durchführen. Dafür hat Nuxwin mir mal ein PHP-Skript gegeben

  • Es geht um einen Disaster-Recovery-Test bei dem die Backups vorliegen die i-MSCP von der eigenen Config & DB sowie den Domains anfertigt.


    Das Problem ist das die Wiederherstellung im Account nicht funktioniert wenn die DB nicht existiert.
    Wäre schön gewesen wenn i-MSCP das im Setup prüfen und korrigieren könnte wie es das mit den Ordnern und Berechtigungen in /var/www/virtual macht.


    Vielen Dank auf jeden Fall für das Script dann werde ich das wohl so ins Recovery Script integrieren.


    [EDIT]
    Scheinbar speichert 1.4.7 die Datenbank Kennwörter nicht mehr in der Tabelle was die Wiederherstellung der Kennwörter, die ich nicht alle kenne, schwer machen dürfte.

  • @PrinceOfFail


    Scheinbar speichert 1.4.7 die Datenbank Kennwörter nicht mehr in der Tabelle was die Wiederherstellung der Kennwörter, die ich nicht alle kenne, schwer machen dürfte.


    Password are no longer stored plaintext in the imscp.sql_user table for security reasons. Thus, you must in oder:


    What you want to do exactly? Recreate all databases (empty databases) according those defined in the imscp.sql_database table and once done, trigger a restore for each customer?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • First: This is only a test to check how much the recovery can be automated to make it as fast as possible in case a server goes down. Backups are made regularly and stored offsite on a different server and are archived offline.
    Restoring sites manualy with the Backups is no problem but i want to restore them fast.



    What i want to do is restore a i-MSCP install after a server crash with the latest Backups (imscp & Domain Backups made by i-MSCP backup function)


    Whats working so far ist:
    - Setup i-MSCP
    - restore i-MSCP Settings and Database
    - Reconfigure with new Server informations
    - Setup Databases and Users (with random password thanks to the script provided by you and TheCry)


    Currently the restore is in progress and the Database imports just fine.

  • - Setup Databases and Users (with random password thanks to the script provided by you and TheCry)

    Random passwords is the the answer ;)


    Right now, the i-MSCP restore feature only restores know databases, those which are defined in the imscp.sql_database table.


    So yes, SQL users are not part of the restore process. We could of course add a routine to check if the SQL users that belong to a database (accoding the imscp.sql_user table) don't exist and if that is the case, recreate them with random password. However customers would have to update the password. We could also notify customers by email for the new password but this is a bit sentitive in my opinion.


    See also:

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206