MongoDB mmap to wiredTiger migration
Migrate your existing mmap based MongoDB instance into a wiredTiger manually.
Starting with the major release 4.X.Y of Rocket.Chat, MongoDB has to be setup with a WiredTiger storage engine rather than the deprecated mmapv1 one. This is mandatory, if you plan to upgrade to one of the future Rocket.Chat versions and has to be prepared before initiating the application upgrade.
Requirements
MongoDB instance with mmap storage engine
Quick usage
Stop running Rocket.Chat
Create a database dump from the mmapv1 MongoDB (also to have a backup in place)
Stop mmapv1 MongoDB service, drop existing data files, start up with wiredTiger
Import the dump into the new wiredTiger MongoDB
Start Rocket.Chat
Detailed usage
Stop Rocket.Chat service to ensure a consistent database dump:
Create a database dump from the current mmapv1 MongoDB:
Stop MongoDB service:
Delete the mmapv1 based data files of your existing MongoDB:
Adjust MongoDB configuration to make use of wiredTiger storage engine:
Start MongoDB service again:
If running with a Replica-Set in your mongo.conf initialize replica set
Import dump back into (wiredTiger) MongoDB:
Repair databases and rebuild indices:
Start Rocket.Chat service: