Moving the old mailserver to a new mailserver

Discussion in 'Installation/Configuration' started by vaio1, Jun 21, 2011.

  1. vaio1

    vaio1 Member

    Yes, the server was connected before the restore of the dump. What is the thing/parameter that connect the server all together?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    So it showed up in the server list? But where is it now, have you deleted the record in the server table of the master?

    It is not a single parameter. The server configuration is stored in the server table on the master server. Then there are several permission records in the tbales of the mysql user database and additionally the database login that is used to connect to the master is stored in the /usr/local/ispconfig/server/lib/config.inc.php file.
     
  3. vaio1

    vaio1 Member

    Look at the screenshot posted before. No I have not deleted nothing.

    I have tested also the db connection from the mailserver to the webserver for the dbispconfig database, and it works using the same parameters stored in the mailserver /usr/local/ispconfig/server/lib/config.inc.php file.

    Code:
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = 'webserver.mydomain.com';
    $conf['dbmaster_database']              = 'dbispconfig';
    $conf['dbmaster_user']                  = 'ispcsrv3';
    $conf['dbmaster_password']              = '91628648f8ddcesa11478dc6b139f63077'; <--- is a fake password of course :P
    
    
    I am becoming crazy... any help?

    thanks for help
     
    Last edited: Jun 22, 2011
  4. vaio1

    vaio1 Member

    Hi guys,

    I have spent the whole night to solve the problem but I cannot find any solution. :(
    This morning I would try to update the ispconfig using the update.php process but I get an error:

    Code:
    # php -q update.php 
    
    
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _         ____
    |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                                  __/ |
                                                 |___/ 
    --------------------------------------------------------------------------------
    
    
    >> Update  
    
    Operating System: Debian 6.0 (Squeeze/Sid) or compatible
    
    This application will update ISPConfig 3 on your server.
    MySQL master server hostname [webserver.mydomain.com]: 
    
    MySQL master server root username [root]: 
    
    MySQL master server root password []: mypassword
    
    MySQL master server database name [dbispconfig]: 
    
    PHP Notice:  Uninitialized string offset: 0 in /tmp/ispconfig3_install/install/lib/update.lib.php on line 98
    PHP Fatal error:  Cannot use string offset as an array in /tmp/ispconfig3_install/install/lib/update.lib.php on line 98
    
    
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess the problem is that there is no "server" record for the new mailserver in the databasae of the master server.

    1) What is the server_id in the file /usr/local/ispconfig/server/lib/config.inc.php?
    2) What is the server_id o the mail server record in the server table of the ispconfig database on the master server?

    Another thing: For what reason do you migrate the server? If e.g. instabilities of the operating system on the old server are not the reason, then you should consider to migrate the whole operating system incl. ispconfig with a imaging software to the new server instead of migrating ispconfig settings to a new system.
     
  6. vaio1

    vaio1 Member

    MAILSERVER:

    server_id on /usr/local/ispconfig/server/lib/config.inc.php is 4.

    WEBSERVER:
    Code:
    mysql> connect dbispconfig
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Connection id:    1074
    Current database: dbispconfig
    
    mysql> select server_id, server_name from server;
    +-----------+-----------------------------+
    | server_id | server_name                 |
    +-----------+-----------------------------+
    |         1 | webserver.mydomain.com  |
    |         2 | dbserver.mydomain.com   |
    |         3 | mailserver.mydomain.com |
    +-----------+-----------------------------+
    3 rows in set (0.00 sec)
    
    I have migrated from the old to the new server because the old server must be repaired. I cannot clone the old server os to the new one because they have a different hardware configuration.

    Thanks for your help
    Any idea?
     
    Last edited: Jun 23, 2011
  7. vaio1

    vaio1 Member

    Solved!
    I have set the right server_id index at the /usr/local/ispconfig/server/lib/config.inc.php file and logout and re-login again and now it seems to me that it works as well!

    Code:
    $conf['server_id'] = '3';
    
    Thanks Till
     

Share This Page