Migrating the Smart Hub and Redis Server data
If you want to use a different Smart Hub or Redis Server or both, you must migrate data from the existing Smart Hub and embedded Redis Server. TrueSight Server Automation provides the out-of-the-box migration script that enables you to smoothly migrate this data.
Migration scenarios
The following scenarios are supported:
Scenario | Perform these steps | Instructions |
---|---|---|
You are using Smart Hub 20.02 or 20.02.01 on a Windows system, and you want to upgrade Smart Hub and Redis Server to the latest version. |
| |
You are using Smart Hub 20.02 or 20.02.01 on a Windows or a Linux system. You now want to use a different Smart Hub and Redis Server. |
|
Prerequisites
Make sure to download the migration script from EPD. The migration script is packaged with the Smart Hub installer. For more information, see Downloading-the-installation-files.
Migrating the Redis Server data
Redis Server is not packaged with Smart Hub 21.02 on a Windows system. Therefore, before you upgrade Smart Hub to 21.02, you must migrate data from the embedded Redis Server to an external Redis Server. Also, make sure that you also upgrade the Application Server to 21.02. For instructions, see Upgrading the Application Server.
Do the following:
- Log in to the server where the existing Smart Hub is installed.
- Copy SmartHub_data_migration script to a temporary directory.
- Navigate to the same directory.
- Do the following to export data from the embedded Redis Server.
- Run the migration script:
- (Windows) SmartHub_data_migration.bat
- (Linux) SmartHub_data_migration.sh
- When prompted to import data, type n and press Enter.
- When prompted to export data, type y and press Enter.
- When prompted to select a component, type 1 to select Redis Server and press Enter.
The exported data is added to the Redis_Data.zip file that is created at the Smart Hub installation path:
- Run the migration script:
- (Windows) C:\Program Files\BMC Software\SmartHub
- (Linux) /opt/bmc/bladelogic/SmartHub
- Log in to the Linux host where the external Redis Server is installed.
- Copy the SmartHub_data_migration script and Redis_Data.zip files to a temporary directory.
- Navigate to the same directory.
Do the following to import the embedded Redis Server data.
- Run the migration script:
- (Windows) SmartHub_data_migration.bat
- (Linux) SmartHub_data_migration.sh
- When prompted to import data, type y and press Enter.
- When prompted to select a component, type 1 to select Redis Server and press Enter.
- Run the migration script:
- Configure the Redis Server:
- Navigate to the following directory:
<installation_directory_of_redis>/redis.conf In a text editor, open redis.conf and configure these properties:
"dbfilename":"redisdb.rdb",
"appendonly":"yes",
"appendfsync":"always",
"auto-aof-rewrite-min-size":"1gb",
"dir":"<path to the Data folder that contains migrated data>",
"bind":"<IP address of the Linux system>"- Save the changes.
- Navigate to the following directory:
- Do the following to change the Redis Server host in the existing Windows Smart Hub:
- Log in to the system where the Smart Hub is installed.
- Run the following command to stop the Smart Hub service. For details, see Managing-the-Smart-Hub.
- Navigate to the following path:
<installation_directory>/smarthub/config Open config.json and update the Linux Redis Server details:
"elasticCacheAddress": "<linux_redis_server_host_name>"
"elasticCachePort": <linux_redis_port>- Run the following command to start the Smart Hub service. For details, see Managing-the-Smart-Hub.
- Upgrade Smart Hub to 21.02. For instructions, see Upgrading the Smart Hub.
Migrating the Smart Hub and Redis Server data
If you want to use a new Smart Hub and Redis Server, you need to migrate data from the existing Smart Hub and Redis Server. You can migrate data to:
- The Smart Hub with the embedded Redis Server installed on a Linux server
- The Smart Hub and external Redis Server installed on separate Linux servers
Do the following:
- Log in to the host where your existing Smart Hub is installed.
- Copy SmartHub_data_migration script to a temporary directory.
- Navigate to the same directory.
- Export the Smart Hub and Redis Server data:
- Run the migration script:
- (Windows) SmartHub_data_migration.bat
- (Linux) SmartHub_data_migration.sh
- When prompted, specify that you want to export all data that includes data of Smart Hub, Smart Hub Gateway, and Redis Server.
The exported data is added to the SmartHub_Data.zip and Redis_Data.zip files.
- Run the migration script:
- If you are using the Smart Hub with the embedded Redis Server on a Linux system, do the following:
- Log in to a Linux system where the new Smart Hub is installed.
- Copy the SmartHub_data_migration script, SmartHub_Data.zip, and Redis_Data.zip to a temporary directory.
- Navigate to the same directory.
Import the Smart Hub and Redis Server data.
- Run the migration script:
SmartHub_data_migration.sh - When prompted to import data, type y and press Enter.
- When prompted, type A to specify that you want to import both the Smart Hub and Redis Server data.
If you assigned the same DNS name for the new Smart Hub host, your data migration is now complete. Otherwise, go to step 7.
- Run the migration script:
If you are using an external Redis Server, do the following:
- Import the Redis Server data:
- Log in to the Linux system where the external Redis Server is installed.
- Copy the SmartHub_data_migration script and Redis_Data.zip to a temporary directory.
- Navigate to the same directory.
- Import the Redis Server data.
- Run the migration script:
SmartHub_data_migration.sh - When prompted to import data, type y and press Enter.
- When prompted, type 1 to specify that you want to import the Redis Server data.
- Run the migration script:
- Import the Smart Hub data:
- Log in to the Linux system where the new Smart Hub is installed.
- Copy the SmartHub_data_migration script and SmartHub_Data.zip to a temporary directory.
- Navigate to the same directory.
- Import the Smart Hub data.
- Run the migration script:
SmartHub_data_migration.sh - When prompted to import data, type y and press Enter.
- When prompted, type 2 to specify that you want to import the Smart Hub data.
- Run the migration script:
- Import the Redis Server data:
- If a different DNS name is used for the new Smart Hub, do the following:
- Register the new Smart Hub in the Application Server. For details, see Configuring-the-Smart-Hub-and-Smart-Hub-Gateway.
Update the Smart Agent configuration properties to establish Smart Agent communication with the new Smart Hub:
- Log in to the system where the RSCD Agent is installed.
- Navigate to the following path:
- (Windows) c:\windows\rsc
- (Linux) /etc/rsc
Open the smartagent.conf file, and edit the following properties:
rest_api":{
"host":"<new_smarthub_host>",
"port":<new_smarthub_port>,- Save the changes.
- Restart the Smart Agent. For details, see Managing-the-Smart-Agent.
- Repeat these steps for the other targets where the RSCD and Smart Agents are installed.