Article ID: 128038, created on Jan 12, 2016, last review on Aug 18, 2016

  • Applies to:
  • Business Automation

Scheme

  1. Migrate Database
  2. Reconfigure Linux BA App
  3. Movie IP address, hostname
  4. Register BA App and DB nodes in OA

Database migration is a time consuming operation. The operation is performed on Windows Business Automation Database server and it depends on total amount of CPU. A number of CPUs decreases total time of database migration proportionally.

Migrate Database

  1. On Linux BA DB, allow connection from Windows BA DB in the /var/lib/pgsql/data/pg_hba.conf file. Add the following line:

    host    all         all         XX.XX.XX.XX/32          trust
    

    Where XX.XX.XX.XX - IP of Windows BA DB

  2. On Linux BA DB, run the following command to sync the firewall configuration with pg_hba.conf:

    /usr/local/bm/tools-db/pgsql_firewall.sh
    
  3. Reload postgresql with the command:

    /etc/init.d/postgresql reload
    
  4. Install the following software on Windows BA DB:

  5. Copy the migration script ba_migration_win.py to Windows BA DB.
  6. Run the following script on Windows BA DB to validate the destination node before data migration:

    C:\Python27\python ba_migration_win.py --check --win=[WIN_DB_LOGIN]:[WIN_DB_PASSWD]@WIN_BA_DB --lin=[LIN_DB_LOGIN]:[LIB_DB_PASSWD]@LIN_BA_DB
    

    where:

        WIN_BA_DB – Source Windows BA DB host
        WIN_DB_LOGIN – Database login to source BA DB
        WIN_DB_PASSWD – Database password to source BA DB
        LIN_BA_DB – Destination BA DB host
        LIN_DB_LOGIN – Database login to destination BA DB
        LIB_DB_PASSWD – Database password to destination BA DB
    

    for example:

        C:\Python27\python ba_migration_win.py --check --lin=pba:pba@10.31.235.202 --win=pba:pba@10.31.233.70
    
  7. After checks are passed successfully, go to the next step. If not, you should install the reported missing components on Linux BA App node.
  8. Stop BA on Windows BA App:

    # net stop ssm
    
  9. Stop BA on Linux BA App:

    # /etc/init.d/pba stop
    
  10. Copy scripts to Linux BA DB:

  11. Execute the script ba_migration_lin_pre.sh on Linux BA DB to prepare empty pba_mig database for data migration:

    # sh ba_migration_lin_pre.sh
    
  12. Run the data migration script on Windows BA DB:

    C:\Python27\python ba_migration_win.py --transfer --win=[WIN_DB_LOGIN]:[WIN_DB_PASSWD]@WIN_BA_DB --lin=[LIN_DB_LOGIN]:[LIB_DB_PASSWD]@LIN_BA_DB
    

    where:

    WIN_BA_DB – Source Windows BA DB host
    WIN_DB_LOGIN – Database login to source BA DB
    WIN_DB_PASSWD – Database password to source BA DB
    LIN_BA_DB – Destination BA DB host
    LIN_DB_LOGIN – Database login to destination BA DB
    LIB_DB_PASSWD – Database password to destination BA DB
    
  13. After data transfer execute finalizing script on Linux BA DB

    sh ba_migration_lin_post.sh
    

Configure Linux BA App

  1. Remove all files in var\restapi directory on Linux BA App
  2. From the source BA installation copy the following files and directories:

    conf\_amt_service_.res
    conf\ip_access.db
    conf\AMAIL-users.db
    license\keys\license.xml
    license\db.password
    etc\certs\API.cert_file
    etc\certs\API.pk_file
    var\restapi
    conf\locale
    customization
    attachments
    
  3. Copy the ba_migration_lin_fix.sh to the Linux BA App.
  4. Run scripts:

    # sh ba_migration_lin_fix.sh
    
  5. Change HOST_IP and PBA_HOSTNAME parameters in the etc/ssm.conf.d/global.conf file with the values from Windows BA APP.
  6. If BA Watchdog is configured, copy all parameters of Windows BA APP into the [environment] section of the etc/ssm.conf.d/wd.conf file.

Configure Linux Management Node

  1. Login to the Linux MN
  2. Execute the command:

    # psql -Uplesk -h`hostname` -c "update bmbridge_settings set value=value||':8443' where name='url.bm.ui' and value not like '%8443'"
    

Move IP address and hostname

  1. Shutdown Windows BA APP.
  2. Move FrontNet/BackNet IPs and hostname from Windows BA APP to Linux BA APP.
  3. Restart Linux BA APP.
  4. Reupload the encryption keys according to the instruction

Register BA App and DB nodes in OA

Before registering of BA nodes in OA, install the following role packages on OA Management Node:

  • PBAHostRole (type: other)
  • PBARole (type: other)
  • PBADatabaseRole (type: other)
  • PBAOnlineStoreRole (type: other)

Remove file /usr/local/bm/add_role_upgrade from Linux BA DB and Linux BA APP nodes.

Use the instructions to register BA nodes in OA.

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF