IBM Support

Migrate RTM to a new host with remote database

Question & Answer


Question

How to migrate RTM to a new host with the RTM database residing on a remote database?

Answer


RTM 9.1.3 Migration with remote database

SCOPE :

Migrate RTM from an existing host to a new one , the database residing on a third host. Once you have your new RTM environment working for some time without any errors, you can remove the old environment.

Note: It’s been assumed that the commands will be run by root user.

On Old Server

1. Check to see if the old RTM server is configured to use a service account. You can check this by reviewing the contents of the file /opt/IBM/rtm/etc/lsfpollerd.conf for the word Daemon_user. If different than apache or wwwrun, you are using a service account and need to adjust the procedures below to accommodate that change.

On New Server


2. Stop all the below services on a new VM
# service lsfpollerd stop
# service licpollerd stop
# service advocate stop
# service crond stop
# service httpd stop
# service mysqld stop

Wait for 1 minute

3. In new server ,move all files (including php and pl) from /opt/IBM/cacti/scripts to new directory /opt/IBM/cacti/scripts.orig

Make a new directory under /opt/IBM/cacti/scripts.orig and move all files.

# mkdir /opt/IBM/cacti/scripts.orig

# mv /opt/IBM/cacti/scripts/* /opt/IBM/cacti/scripts.orig/

4. Make a new directory and move all files from /opt/IBM/cacti/resource/script_queries to a new directory

# mkdir /opt/IBM/cacti/resource/script_queries.orig

# mv /opt/IBM/cacti/resource/script_queries/* /opt/IBM/cacti/resource/script_queries.orig/

5. Move all files from /opt/IBM/cacti/resource/script_server to a new directory

# mkdir /opt/IBM/cacti/resource/script_server.orig

# mv /opt/IBM/cacti/resource/script_server/* /opt/IBM/cacti/resource/script_server.orig/

6. Move all files from /opt/IBM/cacti/resource/ snmp_queries to a new directory

# mkdir /opt/IBM/cacti/resource/snmp_queries.orig

# mv /opt/IBM/cacti/resource/snmp_queries/* /opt/IBM/cacti/resource/snmp_queries.orig/

7. Move all files from /opt/IBM/cacti/plugins/ to a new directory

# mkdir /opt/IBM/cacti/plugins.orig

# mv /opt/IBM/cacti/plugins/* /opt/IBM/cacti/plugins.orig/

On Old Server

From old server, copy the files to new server. You may replace “new_host” with the IP address of the new host.

8. Rsync all the above directories :

# rsync -rp /opt/IBM/cacti/scripts/* new_host:/opt/IBM/cacti/scripts/

# rsync -rp /opt/IBM/cacti/resource/script_server/* new_host:/opt/IBM/cacti/resource/script_server/

# rsync –rp /opt/IBM/cacti/resource/snmp_queries/* new_host:/opt/IBM/cacti/resource/snmp_queries/

# rsync -rp /opt/IBM/cacti/resource/script_queries/* new_host:/opt/IBM/cacti/resource/script_queries/

# rsync -rp /opt/IBM/cacti/plugins/* new_host:/opt/IBM/cacti/plugins/

Copy all RRA files from old host to new host

# rsync -rp /opt/IBM/cacti/rra/* new_host:/opt/IBM/cacti/rra/

9. Copy the lsf info with cluster id from old to new server (<cluster id> would be number e.g 1 ,2 3 etc)

# rsync –rp /opt/IBM/rtm/etc/<cluster id> new_host:/opt/IBM/rtm/etc/

On New Server

10. Compare the permissions of the directories and its files with old server

/opt/IBM/cacti/rra/

/opt/IBM/rtm/etc/<cluster id>

By default , these are owned by user apache. It may be customized according to customer’s environment.

Run the below commands to match the permissions (use –R to change the permissions for files)

chown –R apache:apache /opt/IBM/cacti/rra/

chown –R apache:apache /opt/IBM/rtm/etc/<cluster id>

On LSF Cluster

11. Update the lsf.conf file on lsf cluster with the name of the new server under the old host.

Like :

#berry DEC3100 ! 1 3.5 1 2 (ultrix fs bsd mips dec)

#orange ! SUNSOL 1 3.5 1 2 (sparc bsd) #Example

#prune ! ! 1 3.5 1 2 (convex)

Old_host ! ! 1 3.5 1 2

New_host ! ! 1 3.5 1 2

After updating the above file , run the below command to make it effective :

# lsadmin reconfig

# badmin reconfig

Also check the connectivity if both (lsf host and new_host)can ping each other.

Pointing the new RTM host to database


12. Make changes to the configuration files on the RTM host machine. Locate the line where the database hostname is defined and change "localhost" or "127.0.0.1" to the hostname or IP of the database server in the following files:


# vim /opt/IBM/cacti/include/config.php
# vim /opt/IBM/rtm/lsf*/bin/grid.conf

(* = lsf701, lsf702,lsf703,lsf704,lsf705,lsf706,lsf8,lsf91)

# vim /opt/IBM/rtm/etc/lsfpollerd.conf

# vim /opt/IBM/rtm/etc/lic.conf

# vim /etc/rsyslog.conf

# vim /opt/cacti/plugins/syslog/config.php

On database server

13. Check if the permissions to new RTM host from remote database has been given

e.g (to give permissions to new_host)

# mysql

# GRANT ALL PRIVILEGES ON cacti.* to 'cacti'@'new_host' IDENTIFIED BY ’password’;

On Old Server

14. Stop all the services on old host.

service lsfpollerd stop

service licpollerd stop

service advocate stop

service crond stop

service httpd stop

service mysqld stop

On New Server

15. Start all the services on new host except mysqld.

service httpd start

service advocate start

service lsfpollerd start

service licpollerd start

service crond start

16. Check if the cluster status is up

Check if you don’t see any error logs in “Clog” after 2-3 cycles.

Check , if you are able to see old graphs.

Check the jobs status, if they are running and updating graphs.

[{"Product":{"code":"SSVMSD","label":"Platform RTM"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1.3","Edition":"Standard","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1022299