2

We have a mongo(v3.0.3) database->collections which is in mmap storage engine.

We are trying to change it to wiredtiger

we tried the process below.But we still see the same old storage engine

http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger

Can some one help us with the steps to follow in migrating?

When I restore data it gives the below error messages

mongorestore --collection testCollections --db TestDataBase /backup/TestDataBase/testCollections.bson

error: E11000 duplicate key error index: TestDataBase.testCollections.$_id_ dup key: { : ObjectId('55f50ea2f7ec8be2e035800f') }
3

That error implies there is already data in TestDataBase.testCollections. You might consider using the --drop option:

Before restoring the collections from the dumped backup, drops the collections from the target database. --drop does not drop collections that are not in the backup.

When the restore includes the admin database, mongorestore with --drop removes all user credentials and replaces them with the users defined in the dump file. Therefore, in systems with authorization enabled, mongorestore must be able to authenticate to an existing user and to a user defined in the dump file. If mongorestore can’t authenticate to a user defined in the dump file, the restoration process will fail, leaving an empty database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.