3.8.1 Procedure 19 Restore Database

Table 3-24 Procedure 19 - Restore Database

S T E P # This procedure restores the database on the LSMS server. Estimated time:60 minutes

☐1.

MPS A server:

Log in to the server as the user “root”.

Login: root
Password: <root_password>

☐2.

MPS A server:

Copy the snapshot files from the Remote server to the current LSMS Active server.

Transfer all the NPAC region DB snapshot files, supDB MySQL dump and users MySQL dump from the Remote server to current LSMS A server.

Note: The NPAC regions are: CanadaDB, MidAtlanticDB, MidwestDB, NortheastDB, SoutheastDB, SouthwestDB, WestCoastDB and WesternDB

# scp –p root@<Remote IP>: <Remote IP Path>/mysql-snapshot-
<NPAC region>.tar.gz /var/TKLC/lsms/free 
Password: <root_password>
# scp –p root@<Remote IP>:<Remote IP Path>/supDBdump.sql
/var/TKLC/lsms/free 
Password: <root_password>
# scp –p root@<Remote IP>:<Remote IP Path>/ MySQLUserGrants.sql /var/TKLC/lsms/free
Password: <root_password>

3.

MPS A server:

Create DB schema for all regional DB for which restore needs to be done

Switch user to lsmsadm and create regional DB for all regions that were connected to LSMS before migration

# su – lsmsadm
$ npac_db_setup create <region name>

Note: Run above command for all regions.

☐4.

MPS A and B server:

Stop LSMS processes

Run this step on Standby LSMS server first followed by the active LSMS server.

# su – lsmsmgr
Main Menu with Maintenance selected for node management.


Maintenance Menu with Stop Node selected.


Stop Node dialog asking for confirmation of a possible service interruption.


Message confirming that node shutdown completed successfully.

Exit the lsmsmgr menu.

☐4.

MPS A and B:

Run the “hastatus” command to verify the HA state of this server.

Run the following command on both LSMS A and B to verify the HA state of mated LSMS pair.

# hastatus

Verify that the hastatus of both the servers is ‘UNINITIALIZED "INHIBITED"’.

WARNING: If the output from the above command is anything else other, do not proceed with this procedure and contact My Oracle Support following the instructions on the Appendix E.

☐5.

MPS A server:

Extract the snapshot data from the archive tar files copied from LSMS.

# cd /var/TKLC/lsms/free

Restore the <regionDB> with the regional database name (For example: CanadaDB)

# tar -xzvf /var/TKLC/lsms/free/mysql-snapshot-
<regionDB>.tar.gz
# scp /var/TKLC/lsms/free/<regionDB>/*MY*
/var/TKLC/lsms/db/<regionDB>
# rm -rf /var/TKLC/lsms/free/<regionDB>

☐6.

MPS A server:

Restore supDB and MySQL Users.

Run the below commands:

# systemctl start mysqld

Restore the ‘supDB’

# mysql -udbroot -p[dbroot_password] supDB <
/var/TKLC/lsms/free/supDBdump.sql
mysql -u dbroot -p<mysql_password> supDB -e 'UPDATE LsmsUser set FirstLogonFlag=1;'

Restore MySQL users

# mysql -udbroot -p[dbroot_password] <
/var/TKLC/lsms/free/MySQLUserGrants.sql 
# systemctl stop mysqld

Note: Below warning message can be ignored if displayed:

Warning: Using a password on the command line interface can be insecure.

☐7.

MPS A server:

Remove the snapshot files

Remove the snapshot files.

# cd /var/TKLC/lsms/free 
# rm –f mysql-snapshot-* 
# rm –f supDBdump.sql
# rm –f MySQLUserGrants.sql

☐8.

MPS A server:

Check ownership of database files

Verify dbadm:dbadm ownership of all database files and directories.

# cd /var/TKLC/lsms/db 
# ls –ltr <DB Name>

where <DB NAME> is supDB or <region> DB, where <region> is the name of an NPAC region.

If any databases have ownership other than dbadm:dbadm, change them using this command:

# chown -R dbadm:dbadm <DB NAME>

☐9.

MPS A and B server:

Start LSMS processes

Run this step on LSMS A server first followed by LSMS B server.

Run the below command to check if lsms status is UNINITIALIZED "INHIBITED" before running startNode.

# hastatus 
UNINITIALIZED

If the status is UNINITIALIZED and not UNINITIALIZED "INHIBITED", run hafailover, else continue with Step 3.

#/usr/TKLC/plat/sbin/hafailover--inhibit
# hastatus
UNINITIALIZED "INHIBITED"
# startNode

☐10.

MPS A and B:

System Heath Check

Perform Procedure 18 to verify the system health check after DB full migration.

☐11.

LSMS Active server:

Login to LSMS GUI

Login to LSMS Active GUI as lsmsall user.

☐12.

LSMS Active server:

Configure MySQL Port

Refer to the recorded value of MySQL Port in 28 Procedure 6 step 11. If the MySQL Port is default port, then skip the next step.

Otherwise, go to “Admin -> MySQL Port -> Modify” and configure the port recorded from LSMS 13.5.X.

☐13.

LSMS Active server:

Verify the ELAP Credentials

Go to “Configure -> LNP System -> EMS -> View” to verify the ELAP Credentials are identical to the recorded value of the ELAP Credentials in Procedure 6, step 12.

Otherwise, go to “Configure -> LNP System -> EMS -> Modify” and configure the ELAP Credentials recorded from LSMS 13.5.X.

Note: Re-configure the EMS on LSMS with the details captured in Procedure 6, step 8.

This procedure is complete!