Database config

Discussion in 'General' started by Fernando Azevedo, Oct 26, 2018.

  1. Fernando Azevedo

    Fernando Azevedo New Member

    Hi all,

    My server is growing fast and I'd like to move MariaDB to a dedicated server.

    What I've figured is I can do on a maintenance window is:
    1. Stop most services, except the MariaDB;
    2. Dump all databases into a backup file (including drop and create);
    3. Create new databases in the dedicated server using the dump file;
    4. Configure ISPConfig to use the net database server;
    5. Restart all services.

    Am I missing out something here?

    What I do not know yet is what files to edit with the new database address. Any clues?

    Thanks in advance!
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You must first add the database server to your ISPConfig setup. And configure it as DB server in ISPConfig. See the ISPConfig Manual.
    Then you create new databases on that new hosts setting up database users and passwords for each website. Now you can move the database from old host to new.
    Then you need to edit the settings inside the website, there is a host setting or similar to the database hosts. Change it to the dedicated db host.
    You can do the moving databases one website at a time, if your maintenance window is too short to do all of them at once. My experience is it takes about 20 minutes to move one database. Reading the dump on the new host is the slowest part in my setup.

    Alternative to the above if you plan to get a new setup anyway is to install a new ISPConfig Multiserver setup and use Migration Tool to migrate your whole setup to the new servers.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    To help speed this step you can create a dns name ahead of time and point all websites to that, then just change the dns record when you migrate. (eg. .. set as a CNAME of 'localhost.' initially, then change to an A record or CNAME of your db server when you cut over)

Share This Page