Report this

What is the reason for this report?

Error creating index while mongorestore the dump into the db

Posted on October 6, 2015

I need to import my db from the old hosting. Iv’e already exported it from the old hosting using mongodump and now trying the following:

mongorestore --host 127.0.0.1 --port 27017  ~/dump/bassfunk_moscow/

it stops with the

/root/dump/bassfunk_moscow/bassfunk_moscow.system.indexes.bson
Tue Oct  6 10:59:58.478 	going into namespace [bassfunk_moscow.bassfunk_moscow.system.indexes]
Tue Oct  6 10:59:58.478 file /root/dump/bassfunk_moscow/bassfunk_moscow.system.indexes.bson empty, skipping
Tue Oct  6 10:59:58.478 	Creating index: { name: "_id_", key: { _id: 1 }, ns: "bassfunk_moscow.bassfunk_moscow.system.indexes" }
Tue Oct  6 10:59:58.479 ERROR: Error creating index bassfunk_moscow.bassfunk_moscow.system.indexes: 2 err: "cannot write to 'bassfunk_moscow.bassfunk_moscow.system.indexes'"

Some content seems to be imported, some of it not. Seems like all the images imported only names and ids, but not the imagefiles itself.

What should be my next steps? I’m lost here. The DB dump is not that big - about 50mb. The whole log here

uname -a
Linux bassfunk 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Deleting bassfunk_moscow.system.indexes.bson from the dump resolved the problem

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.