MongoDB Migration Doc v2.0
As part of the iFIX-2.0-alpha release, we have migrated the following master data from ifix_db to mgramseva_db:
Adapter Master Data Service
Department
Expenditure
Project
Department Entity Service
Department Entity
Department Hierarchy
Out of these, the project data SHOULD NOT be copied to the new DB because a new feature of the multi-tenant(GP) project is introduced with this release. New projects should be created that could be linked to multiple GPs.
Other master data can be copied.
Pre-requisites
Make sure the playground pod is “dwssio/playground:mongo-v2” or newer.
Keep the MongoDB Credentials handy in the following format
Host(in this format): “<host-address>:27017”
Username - a user that has access to BOTH source and destination dbs
Password
Source and Destination DB Names
List of collection names to be copied
The
mongo-migration.sh
script copied to the playground pod. (You should have necessary kube permissions to copy a file to a pod.)Sample Command to copy the file:
kubectl cp mongo_migration.sh ifix/<playground pod>:/
Migration Instructions
A MongoDB Dump script is provided that will copy a list of collections from a source db to the destination db.
Execute the provided script with following parameters:
-h = Host Address
-u = username
-p = password
-s = source db
-d = destination db
-c = collection name - You can provide multiple collection as depicted in the following example
./mongo-migration.sh -h <host-address>:27017 -u <ifix username> -p <ifix password> - s <ifix db> -d <mgramseva db> -c department -c expenditure -c departmentHierarchyLevel -c departmentEntity