Migrate all database from a node to another node of the same ispconfig stack

Discussion in 'ISPConfig 3 Priority Support' started by tr909192, May 15, 2019.

  1. tr909192

    tr909192 Member HowtoForge Supporter

    Dear,
    we need to move all customer database from an ispconfig node to another ispconfig node. In order to make remote the database access (we want dedicate a node only to mysql).
    We think to procede in the follwing way:
    • dump every database from the local node to the external node;
    • change the host record on the ispconfig master database in order to point the db on the external node;
    • change the connection details of the application from localhost to the remote host;
    There is more step to consider? For example we need to add the remote ip address to the mysql user accepted connection to the new mysql database grant? Other than that? The backup feature of ispconfig will continue to work?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have ISPConfig installed on that mysql node?
     
  3. tr909192

    tr909192 Member HowtoForge Supporter

    Yes, we have an ISPConfig installed on the external mysql node.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, in that case, the backup feature will continue to work and when you re-create the database on the new database server and select the right website for the database, then ispconfig should add access to the database from web server IP automatically.
     
  5. tr909192

    tr909192 Member HowtoForge Supporter

    Thank's but we don't wanna recreate manually the databases (are >100). But automatically move all the database from the localserver to the remote one. Is for that, that we'd like to procede how we have described on the first post. If is it possible.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    In that case, I would change the server_id of the database user and database records in ispconfig database on the master to the new server and then run tools > resync (for the new server) to recreate the mysql users and databases on the new server node. Otherwise, ispconfig will not know that the databases are on a new server and backup and also database editing in ispconfig will fail.
     
  7. tr909192

    tr909192 Member HowtoForge Supporter

    mmmh...so before I need to modify the server_id of db/user on ispconfig then resync the data on the new server, and then reimport the dump of all databases on the new server?

    In that way my procedure change in this way:
    • dump every database
    • change server_id of db/user on ispconfig
    • resync mysql on new node (the same node of the server_id changed before)
    • import dump of every database on the new node
    • change the host record on the ispconfig master database in order to point the db on the external node;
    • change the connection details of the application from localhost to the remote host;
    Is that correct?

    ty
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be fine.
     

Share This Page