Critical situation: MySQL server crash, lost database

  • Hello, all.

    I have a critical situation.
    I'm running i-mscp 1.1.0-rc4.7.
    The OS is Debian Wheezy.

    My MySQL server has crashed (physical breakdown, data inaccessible).
    I have the nightly backup of all users' databases, and the imscp main one.
    But have lost everything else (mysql users, roundcube, etc...).
    Can't recover them.

    Is there a way to rebuild the database?


  • Do you have a backup of the imscp database? If yes, you should be able to rebuild your server without any problems. Also all mails and websites still exists?

  • All mails and websites exist.
    The server that got destroyed was a separate MySQL one.

    I have all the customers' backups, and the main imscp database.
    Using the imscp-setup --reconfigure sql script, the system is correctly configured for the new machine.

    But, I'm missing dovecot, pma, vsftp, and mainly the correct mysql database (with users...).

    So... if I go with imscp-setup -b, from scratch, it should work? Last time I tried, I have spend hours repairing several problems because it kept segfaulting...

  • after the imscp-setup you have an working imscp, but without all the imscp-entries. Now you need to

    After that your server should work like before (hope I haven't forgot anything :D)

  • Hello.

    Problem solved. I have managed to recreate the databases and users thanks to Ninos' post.

    I am planning to upgrade, yes, but last time I made an upgrade I ran into segfaults and a very long downtime because of (an unnecessary) chown of ALL e-mails on the server.
    For a web-hosting platform, a long downtime because an upgrade locks down all of the services at once instead of doing it progressively, and stopping them only when really needed, is quite dangerous...
    So, I'll have to find the time to do it that will not inconvenience my users (accessing different services from different timezones).

    Also, I have some custom modifications (separate mail server but still managed by i-mscp, and several others) that I need to take into account before starting a "blilnd" upgrade. Add to that multiple separate hosting
    servers, and you see what nightmare it can become...

    It would be a welcomed change if the upgrade (and rebuild) process could be split down into several ones, without causing complete downtime of all services for the whole duration of the operation...

  • Well, i-MSCP isn't intended to be a "fully customisable system" in the backend, without plugin/hook files like you did.
    This way, this is sure that every upgrade is a nightmare.

    Me, I've done some little changes but they are easy to handle (and a new plugin, still in dev, will help me a lot on that) and I can upgrade easily.

    I never get any "downtime" after an upgrade, or a big load, maybe because I didn't have a lot of datas (around 300GB for now), but the RC wasn't a "stable" release, not for production I mean (more for testing and see if it can match your requirements).

    Well, now, you did what you want, your servers, it's up to you to see if the security and bugfixs of the panel is a priority for you or no :)

  • Yeah, I know.
    The upgrade should go along fine, I just need the time to test it in testing environment.
    Yes, I have a lot of data, and every upgrade just shuts down ALL services at once for the whole duration of the upgrade, from what I've seen (I have other servers, with different, recent, versions of i-MSCP, and even without any modifications on some of them the upgrade is simply taking too long... on some, the users have +1TB of e-mails alone, plus all data in webfolders).
    The changes I've made are quite simple, and I'm looking into redoing them with plugin/hook files in some near future.