This procedure reloads a corrupted or backlevel query server's LNP database by copying another query server's LNP database. If the LSMS is configured with multiple query servers and at least one is currently synchronized, it is recommended to reload a query server from another query server (instead of from the LSMS) to prevent NPAC-to-network element traffic from being interrupted.
# ./mysql -u root -p
Enter password:
<Query Server’s MySQL user root password>
mysql> FLUSH TABLES WITH READ LOCK;
mysql> SHOW MASTER STATUS;
Output similar to the following displays:+---------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +---------------+----------+--------------+------------------+ | mysql-bin.003 | 73 | test | manual,mysql | +---------------+----------+--------------+------------------+
Enter password:
<Query Server’s MySql root user password>
# tar -cvf - /usr/mysql1/supDB/* | gzip > /usr/mysql1/mysql-snapshot-supDB.tar.gz
Create compressed snapshot files for each of the regional databases. Replace <regionDB> with the regional database name (for example, CanadaDB, MidwestDB, and so forth).# tar -cvf - /usr/mysql1/<regionDB>/* | gzip > /usr/mysql1/mysql-snapshot-<regionDB>.tar.gz
# ./mysqld_safe &
Enter password:
<Query Server’s MySQL user root password>
# ftp <IP address of the Query Server being reloaded>
ftp> cd /usr/mysql1
ftp> bin
ftp> prompt
ftp> mput mysql-snapshot*.tar.gz
ftp> bye
# cd /usr/mysql1
# gunzip -c mysql-snapshot-supDB.tar.gz | tar -xvf -
# rm mysql-snapshot-supDB.tar.gz
# gunzip -c mysql-snapshot-<regionDB>.tar.gz | tar -xvf -
# rm mysql-snapshot-<regionDB>.tar.gz
# cd /opt/mysql/mysql/bin
# ./mysqld_safe --skip-slave-start
MASTER_LOG_FILE='<recorded_log_file_name>',
MASTER_LOG_POS=<recorded_log_position>;
mysql> CHANGE MASTER TO
MASTER_LOG_FILE='mysql-bin.003',
MASTER_LOG_POS=73;
mysql> start slave;
The query server should connect to the master server (LSMS or another query server) and catch up on any updates that occurred since the snapshot was taken.