Scheme
- Migrate Database
- Reconfigure Linux BA App
- Movie IP address, hostname
- 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
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
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
Reload postgresql with the command:
/etc/init.d/postgresql reload
Install the following software on Windows BA DB:
- Copy the migration script
ba_migration_win.py
to Windows BA DB. 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
- After checks are passed successfully, go to the next step. If not, you should install the reported missing components on Linux BA App node.
Stop BA on Windows BA App:
# net stop ssm
Stop BA on Linux BA App:
# /etc/init.d/pba stop
Copy scripts to Linux BA DB:
Execute the script
ba_migration_lin_pre.sh
on Linux BA DB to prepare emptypba_mig
database for data migration:# sh ba_migration_lin_pre.sh
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
After data transfer execute finalizing script on Linux BA DB
sh ba_migration_lin_post.sh
Configure Linux BA App
- Remove all files in
var\restapi
directory on Linux BA App 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
- Copy the
ba_migration_lin_fix.sh
to the Linux BA App. Run scripts:
# sh ba_migration_lin_fix.sh
- Change HOST_IP and PBA_HOSTNAME parameters in the
etc/ssm.conf.d/global.conf
file with the values from Windows BA APP. - If BA Watchdog is configured, copy all parameters of Windows BA APP into the
[environment]
section of theetc/ssm.conf.d/wd.conf
file.
Configure Linux Management Node
- Login to the Linux MN
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
- Shutdown Windows BA APP.
- Move FrontNet/BackNet IPs and hostname from Windows BA APP to Linux BA APP.
- Restart Linux BA APP.
- 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.