MongoDB migration example
This documentation describes example commands for MongoDB server instance migration with a native Linux IBM Sterling Transformation Extender installation.
This example shows commands which could be executed to migrate from a local MongoDB server instance to a remote MongoDB server instance. This example assumes that default configuration properties were used when IBM Sterling Transformation Extender was installed natively on the Linux host.
This example assumes that the target MongoDB server instance has been configured and is accessible using the standard MongoDB port from host <MongoDB host>. It is also assumed that the MongoDB database tools have been installed, so that mongodump and mongorestore are available.
- Stops IBM Sterling Transformation Extender using the IBM Sterling Transformation Extender utility shell script.
- cd <IBM Sterling Transformation Extender installation directory>
- ./ITX stop
- Creates a backup of the master database and the resource database. A directory
named dump is created in the IBM Sterling Transformation Extender installation directory by
mongodump. This directory holds the backups. Standard
output and standard errors are appended to file
itx_mongodump.log.
- mongodump --db=mdb &>> itx_mongodump.log
- mongodump --db=rdb_<account ID> &>> itx_mongodump.log
- Restores the dumped databases into the target MongoDB server instance. Standard
output and standard error are appended to file
itx_mongorestore.log.
- mongorestore --host=<MongoDB host> &>> itx_mongorestore.log
- The configuration file config.yaml in <IBM Sterling Transformation Extender installation directory> must be edited to reflect the change in the location of the MongoDB server. Assuming that the default MongoDB port and a remote host are used, the value of the "host" key of the object value of the top-level "mongo" key (mongo.host) must be set to the remote host.
- Starts IBM Sterling Transformation Extender after updating the
MongoDB server configuration. The updated values are read.
- ./ITX start
- After confirming that IBM Sterling Transformation Extender operates
with the new MongoDB server instance as expected, the dump directory should be
removed:
- rm -r dump