mirror setup resync dbispconfig2 with dbispconfig1

Discussion in 'General' started by electronico_nc, May 30, 2020.

  1. Hello,

    The 'slave' server was out of sync so I transfered MariaDB database from 'master' to 'slave', then import, change master-to-master.

    dbispconfig1 is well replicated (master/slave actually) on the 2 servers.
    cron.log contains
    Code:
    DEBUG - Replicated from master: DELETE FROM `spamfilter_users`  WHERE `id` = '475'
    The problem is that dbispconfig2 database used by 'slave' server is lacking a lot of entries (so emails can't be replicated by dovecot for example).
    Code:
    dovecot: doveadm([email protected]): Error: sync: Unknown user in remote
    How could I force dbispconfig2 database to reflect dbispconfig1 ?
    That would be (IMO) re-mirroring 'slave' server.

    Thanks in advance for your thoughts.

    EDIT : config.inc.php
    'master'
    Code:
    define('ISPC_APP_VERSION', '3.1.15p3');
    //** Database
    $conf['db_type'] = 'mysql';
    $conf['db_host'] = 'localhost';
    $conf['db_port'] = '3306';
    $conf['db_database'] = 'dbispconfig1';
    $conf['db_user'] = 'ispconfig';
    $conf['db_password'] = 'f5d93c18703e77343b1e725b138dc8c4';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;
    
    define('DB_TYPE',$conf['db_type']);
    define('DB_HOST',$conf['db_host']);
    define('DB_PORT',$conf['db_port']);
    define('DB_DATABASE',$conf['db_database']);
    define('DB_USER',$conf['db_user']);
    define('DB_PASSWORD',$conf['db_password']);
    define('DB_CHARSET',$conf['db_charset']);
    
    
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']            = 'mysql';
    $conf['dbmaster_host']            = '';
    $conf['dbmaster_port']            = '';
    $conf['dbmaster_database']        = 'dbispconfig';
    $conf['dbmaster_user']            = '';
    $conf['dbmaster_password']        = '31e3649262268418c01b3af9f6750dd7';
    $conf['dbmaster_new_link']         = false;
    $conf['dbmaster_client_flags']     = 0;
    
    $conf['server_id'] = '1';
    
    'slave'
    Code:
    define('ISPC_APP_VERSION', '3.1.15p3');
    //** Database
    $conf['db_type'] = 'mysql';
    $conf['db_host'] = 'localhost';
    $conf['db_port'] = '3306';
    $conf['db_database'] = 'dbispconfig2';
    $conf['db_user'] = 'ispconfig2';
    $conf['db_password'] = '4d61a6505e6a5341183fc0eeeb5051b4';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;
    
    define('DB_TYPE',$conf['db_type']);
    define('DB_HOST',$conf['db_host']);
    define('DB_PORT',$conf['db_port']);
    define('DB_DATABASE',$conf['db_database']);
    define('DB_USER',$conf['db_user']);
    define('DB_PASSWORD',$conf['db_password']);
    define('DB_CHARSET',$conf['db_charset']);
    
    
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']            = 'mysql';
    $conf['dbmaster_host']            = 'master.domain.tld';
    $conf['dbmaster_port']            = '3306';
    $conf['dbmaster_database']        = 'dbispconfig1';
    $conf['dbmaster_user']            = 'ispcsrv5';
    $conf['dbmaster_password']        = 'df29023bf4bc3a2535987c5d9c09cf11';
    $conf['dbmaster_new_link']         = false;
    $conf['dbmaster_client_flags']     = 0;
    
    $conf['server_id'] = '5';
    
     
    Last edited: May 30, 2020
  2. Answer is simply : Launch a resync through Tools / resync

    This won"t modify dbispconfig2 database, but all changes to dbispconfig1 will be applied (files modified) by 'slave' server.
     
    Th0m likes this.

Share This Page