Using this procedure, you can migrate the Microstrategy database (mstr db) from the source system Crunchy 2 to the target system Crunchy 5.
Perform this procedure on the target DC1.
Before you begin
Source system with Crunchy 2 environment must be configured.
Target system with Crunchy 5 environment must be configured.
Procedure
Log in to the Cluster Control Manager (CCM) console in target system as the customer user.
Switch to being the root user by entering the command su.
To find the name of the Crunchy 5 primary pod, run the following command:
kubectl get pod -l postgres-operator.crunchydata.com/cluster=analyticsdb,postgres-operator.crunchydata.com/role=master -o name | cut -c 5-
Run the following command into Crunchy 5 primary pod:
kubectl exec -it POD_NAME -- /bin/bash
Here, replace POD_NAME with the name of the Crunchy 5 primary pod found in above step.
Run the following commands in the primary pod:
bash-4.4$ cd pgdata
bash-4.4$ pg_dump -U postgres -W -f mstr.sql avaya_analytics_md --if-exists --clean --create -h Microstrategy_HOST -p Microstrategy_PORT
bash-4.4$ psql -f mstr.sql
bash-4.4$\l (This lists current databases on the cluster. Verify that avaya_analytics_md is in the list of databases.)
bash-4.4$ exit
Note:
The second command pg_dump will request a password for mstr postgres db.
This lists current databases on the cluster. Verify that avaya_analytics_md is in the list of databases.
When prompted, enter the Microstrategy host, and port values noted from the output of running the HAsourcemigrate2to5.sh script on the source CCM in the Setting Source Crunchy 2 Environment section.
Run the command exit to exit from pod and return to CCM.