MongoDB Documentation, Release 3.0.4 Considerations and Compatibility If you upgrade to MongoDB 2.4, and then need to run MongoDB 2.2 with the same data files, consider the following limitations. Basic Downgrade and Upgrade Except as described below, moving between 2.2 and 2.4 is a drop-in replacement: mongod --dbpath /var/mongod/data --shutdown mongod --dbpath /var/mongod/data Replace /var/mongod/data with your MongoDB dbPath . Replace /var/mongod/data with your MongoDB dbPath . Downgrade to 2.2 After Creating a 2dsphere or text Index If you have created 2dsphere or text in- dexes while running a 2.4 mongod instance, you can downgrade at any time, by starting the 2.2 mongod with the --upgrade option as follows: mongod --dbpath /var/mongod/data/ --upgrade Then, you will need to drop any existing 2dsphere or text indexes using db.collection.dropIndex() , for example: db.records.dropIndex( { loc: "2dsphere" } ) db.records.dropIndex( "records_text" ) db.getSiblingDB('<databasename>').stats().dataFileVersion While running 2.4, to check the data file version of a MongoDB database, use the following operation in the shell: 'need to upgrade database index_plugin_upgrade with pdfile version 4.6, new version: 4.5 Not Chapter 12. Release Notes 898 Troubleshooting Upgrade/Downgrade Operations If you do not use --upgrade , when you attempt to start a 2.2 mongod and you have created a 2dsphere or text index, mongod will return the following message: Warning: --upgrade will run repairDatabase on any database where you have created a 2dsphere or text index, which will rebuild all indexes. • start the new mongod processes with the same dbPath setting, for example: • stop the existing mongod , using the --shutdown option as follows: • If you never create an 2dsphere or text index, you can move between a 2.4 and 2.2 mongod for a given data set; however, after you create the first 2dsphere or text index with a 2.4 mongod you will need to run a 2.2 mongod with the --upgrade option and drop any 2dsphere or text index. • If you use a hashed index as the shard key index, which is only possible under 2.4 you will not be able to query data in this sharded collection. Furthermore, a 2.2 mongos cannot properly route an insert operation for a collections sharded using a hashed index for the shard key index: any data that you insert using a 2.2 mongos , will not arrive on the correct shard and will not be reachable by future queries. Upgrade and Downgrade Procedures