BMC TrueSight Capacity Optimization (TSCO) deployed on an RHEL 6 server which is being retired and replaced with a new RHEL7 server. What is the process to migrate the existing TSCO installation from the existing machine to the new server?
Check this video from the TrueSight Capacity Optimization Youtube channel:
The process is documented in the Product Documentation in the "Server Migration".
Please refer to the official documentation according to the version you are running.
The following information describes the process with some additional detail that the documentation doesn't provide.
The basic process is:
(1) On the existing AS (the one to be replaced) execute the "COMigrationUtility.sh" command to create the ./migration_output/co_migration_package file.
Key points are that your "working directory" needs to be the $CPITBASE directory when you execute the COMigrationUtility.sh. It will create a ./migration_output/migration_utility.log, review to determine if the process worked properly.
(2) Copy the co_migration_package and co_migration_components files from the existing machine to the new target AS server into the directory where you intend to install the product.
Default Directory /opt/bmc/BCO directory, if any custom directory selects it.
Example:
[root@Hostname BCO]# pwd /opt/bmc/BCO
[root@Hostname BCO]# ls -l total 80 -rw-r--r-- 1 root root 78264 Oct 13 16:10 co_migration_package -rw-r--r-- 1 root root 78264 Oct 13 16:10 co_migration_components
IMPORTANT: The co_migration_package should be copied into the directory where the TSCO product is intended to be deployed, not a temporary directory. So, when installing TSCO into /opt/bmc/BCO the co_migration_package should be copied into that directory.
(3) If this is a single AS environment or this machine was the source of the shared 'repository' directory (its $CPITBASE/repository directory had been shared to the other AS machines in the environment) then also copy the './migration_output/co_repository' file to the new target server.
(4) Execute the regular TSCO setup.sh X-Windows-based installer. See section 'Using the TSCO silent installer to migrate' for information on that alternate workflow.
(5) In X-Windows based option, the setup.sh installer will detect the co_migration_package file and will prompt you to proceed with the migration:
A migration package has been found in the selected folder. Do you want to proceed with the server migration procedure using deployment information available at the migration package?
( ) Yes, proceed with the server migration ( ) No, perform a new install
Pick 'Yes' here -- if this option missing, it means that the installer did not properly detect the co_migration_package file in the target installation directory.
(6) After that the install proceeds normally until the "Shared Repository Configuration" screen.
If the "Local Repository" option selected the installer will then look for the 'co_repository' file in the $CPITBASE directory. If it doesn't find it the installer will ask you to copy it over.
Using the TSCO silent installer to migrate
For the TSCO Application Server
If want to execute migration silently then there is one parameter that you need to add in the silent installation option file for example BCO_FIRST_SERVER_TYPICAL.txt and the parameters are
Note that it is necessary to first copy the content of the migration_output folder in /opt/bmc/BCO (which is my installation directory so that installer can detect existing setup on new server)
The template file to use for the silent TSCO ETL Engine (EE) server migration is the BCO_ADDITIONAL_SERVER_EE.txt file. Make sure that the IS_MIGRATION_FLOW option is set to 'true' and the MIGRATE_REPOSITORY option should remain 'false' for a TSCO EE migration.
The use the standard command to run the migration:
Review the TSCO product documentation for more details as this KA give a general flow for the silent migration but doesn't provide much detail.
Common Migration Problems
When running the COMigrationUtility.sh command your Current Working Directory must be the $CPITBASE directory (/opt/bmc/BCO by default). The documentation is not clear about this.
So, on the "source" machine need to do this: cd /[BCO Installation Directory] /[Full Path To Installation Image]/BCO/Disk1/utility/COMigrationUtility.sh
Or, copy the /[Full Path To Installation Image]/BCO/Disk1/utility/COMigrationUtility.sh file to the /[BCO Installation Directory] (/opt/bmc/BCO by default) and run it from there: ./COMigrationUtility.sh
If the COMigrationUtility.sh is run using a different working directory it will run to completion and create a co_migration_package but that file will be incomplete.
Looking at the log file you'll see errors as this report:
./COMigrationUtility.sh: line 75: ./env.sh: No such file or directory Stopping all services
./COMigrationUtility.sh: line 80: ./cpit: No such file or directory <-- cut -->
That, and other errors in the log, would indicate that the "co_migration_package" that was created was invalid -- it wouldn't include the necessary files.
When trying to complete the migration to the new server by running the setup.sh and specifying the co_migration_package to the upgrade the installer would fail with the error, "BCO_INST_ERRO101: Error while validating Database instance: Database is not empty for user BCO_OWN".
In some environments the setup.sh migration may run for a long time (over an hour)
In most environments, the migration workflow will be used to migrate the existing version of TSCO from one machine to another machine. But the migration itself is designed in a way that supports a combined migration + upgrade (although a best practice would be to run them as separate steps to simplify problem determination if necessary). Due to this the setup.sh run in migration mode runs through a lot of steps that are also executed during a TSCO upgrade. One of those steps is the execution of the dbspacemanager.sh script. While the dbspacemanager.sh is running it can be seen in 'ps -ef | grep dbspacemanager' output and it logs what it is doing to the $CPITBASE/scheduler/log/cpit.log file.
In general the setup.sh should not be terminated while it is running without a discussion with a Subject Matter Expert. Please engage Technical Support to review the migration status before killing the running installer in the event of a suspected hang.
Migration plus changing installation parameters via the silent installer
When using the silent installer to migrate from one environment to another while also changing the TSCO database configuration parameters problems have been seen where the existing TSCO environment configuration parameters will override the desired updated parameters specified in the silent installation configuration file. If attempting to migrate TSCO from one server to another while also changing the TSCO environment (such as the TSCO database instance) contact TSCO Technical Support if the migration fails and provide the /tmp/bco_install_log and /[TSCO Installation Directory]/InstalledConfiguration.xml file for review.