-
Notifications
You must be signed in to change notification settings - Fork 96
Migrating Single Server
This guide explains how to do an offline data migration from MongoDB to TokuMX, for a single server, converting the existing data in MongoDB to TokuMX.
For other migration strategies, start with Migrating from MongoDB.
-
Shut down the existing MongoDB server to make sure you get a consistent backup.
-
Back up the MongoDB database with
mongodump. You will need thedbpathfrom your command-line options or/etc/mongodb.conf(this is often/var/lib/mongodb), and you will need to choose a location for the backup (here,/var/lib/mongodb.backup).$ sudo mongodump --dbpath /var/lib/mongodb --out /var/lib/mongodb.backup - MongoDB latest version - $ sudo mongodump --out /var/lib/mongodb.backup -
Uninstall MongoDB. You can also remove the old
dbpathsince you have a backup. -
Install TokuMX for your distribution (instructions) and make sure it starts properly.
-
Import your backup with
mongorestore. You do not need--dbpath, it will connect to the running server by default.$ mongorestore /var/lib/mongodb.backup -
Connect with
mongoand verify that you're connected to TokuMX and your data has been migrated.$ mongo TokuMX mongo shell v1.4.2-mongodb-2.4.10 connecting to: test > db.serverBuildInfo().tokumxVersion 1.4.2 > show dbs ...