How to migrate user data from MongoDB to a new instance?

Hello

We would like to install MongoDB 6 and Sametime Premium 12.0.2 on a new Ubuntu server. After the initial setup of MongoDB 6 (replica sets, admin user etc.) we would like to shutdown the production Sametime 12.0.1FP1 and migrate users, contact lists and chat history from the production MongoDB 4 to the new MongoDB 6.

I guess using mongodump and mongorestore would probably destroy the existing configuration in MongoDB 6.

Is there a procedure to achieve this?

Thank you!

Regards

Patrice

You can always just restore the target database(s) - chatlogging, meetings, userinfo and not the 'admin' database itself.

I did this for a migration, I still have the steps handy... You add a "--drop" parameter to the mongorestore. I'll give you all the steps I used.

Mongodump the databases on the old environment:

Change directories to where mongodump resides (/usr/bin)

mongodump --username=sametimeUser --password=thepassword --gzip --db=chatlogging --uri=mongodb://<mongoserverhost>:27017 --authenticationDatabase "admin"

Now dump the meeting database:

mongodump --username=sametimeUser --password=thepassword --gzip --db=meeting --uri=mongodb://<mongoserverhost>:27017 --authenticationDatabase "admin"

Now dump the userinfo database

mongodump --username=sametimeUser --password=thepassword --gzip --db=userinfo --uri=mongodb://<mongoserverhost>:27017 --authenticationDatabase "admin"

change directories to dump (/usr/bin/dump)

zip the contents:

tar -cvzf mongodbs.tar.gz *

Copy your zipped file over to the new mongo server.

Make necessary ownership/permissions changes so that you can extract the file as yourself.

take the zipped tar file from the mongodump and extract it to /tmp

The result should be a folder for each database under /tmp, like /tmp/chatlogging and /tmp/meeting

Issue the mongorestore command for chatlogging:

mongorestore --uri=mongodb://newmongo:27017 --username=stadmin --password=thepassword --db=meeting /tmp/chatlogging --gzip --drop --authenticationDatabase=admin

Issue the restore command for meetings:

mongorestore --uri=mongodb://newmongo:27017 --username=stadmin --password=thepassword --db=meeting /tmp/meeting --gzip --drop --authenticationDatabase=admin

Issue the restore for userinfo:

mongorestore --uri=mongodb://newmongo:27017 --username=stadmin --password=thepassword --db=meeting /tmp/userinfo --gzip --drop --authenticationDatabase=admin

Thank you for sharing this procedure! It's exactly what I was looking for.

I issued the 3 mongorestore commands (by adjusting also --db=<dbname>) and got informational messages about the number of succesfully restored documents.

Unfortunately when I logon to Sametime 12.0.2 I don't see any chat history and my contact list contains only empty groups. Persistent chat is working.

Regards

Patrice

We will likely need to review data, so please open a case.

Are you migrating from Domino Directory to LDAP?

Are the users using the same hostname to connect to the new server?

Are you migrating from Domino Directory to LDAP? No. We're already at version 12.0.1.

Are the users using the same hostname to connect to the new server? It's intended to use the same hostname. But for testing I used the Connect Client with the ip address of the new server instead of a server name.

After changing the ip address of sametime.company.com in DNS, the contact lists and the chat history are now available in v. 12.0.2.

Thank you!

Regards

Patrice