Upgrading MongoDB to WiredTiger
To upgrade an existing MongoDB Install to the WiredTiger storage engine, follow these steps:
1. Stop CLOUDFLOW
- Stop CLOUDFLOW. Don't restart it until you finished the MongoDB upgrade.
- Open an activity/task monitor and verify that all CLOUDFLOW processes are stopped. If there are nucleusd, nucleusweb, quantum* or portal.cgi processes still active after a minute, stop them.
2. Upgrade to the latest MongoDB
- Stop the current MongoDB service.
- Download the latest installer for your platform from mongodb.org.
- Run the installer.
- Choose Custom Installation if you want to install the software to a location different from the default program files location.
- Locate where your mongod.conf file is situated.
- Register the new MongoDB as a service:
- Make sure the Services panel is closed on Windows.
- Open a command prompt as administrator.
- Navigate to the bin folder of your new MongoDB install.
mongod.exe --remove
mongod.exe --install --config PATH_TO_MONGOD_CONF
- Start the MongoDB service.
- Verify you are running the correct version by executing from the Mongo bin folder:
mongo.exe
- From the mongo prompt run
db.version()
3. Convert the Dataset to the WiredTiger storage model
- From the bin folder of your new mongo install run the following to dump your database:
mongodump.exe --out TEMP_PATH_FOR_MONGO_DUMP
- Create a new data directory for the WiredTiger storage
- Change the config file to point to the new data directory and force it to use the
WiredTiger storage model. This config file must use the YAML syntax. Typical contents for
the
mongod.conf
file:systemLog: destination: file path: "C:\\MongoData\\logs\\mongodb.log" logAppend: false storage: journal: enabled: true dbPath: "C:\\MongoData\\db" engine: wiredTiger
Important:- Don't copy-paste this, but type it fresh, the YAML format is extremely sensitive for hidden characters.
- Only use spaces, no tabs for indentation.
- Escape your backslashes for Windows paths as in the example above.
- Restart the MongoDB service
- Restore your dump to the new MongoDB database:
mongorestore.exe TEMP_PATH_FOR_MONGO_DUMP
4. Your MongoDB is now running on WiredTiger.
It's safe to start CLOUDFLOW again.