Error creating index while mongorestore the dump into the db

Posted October 6, 2015 9.3k views

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 --port 27017  ~/dump/bassfunk_moscow/

it stops with the

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

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.

Submit an Answer
1 answer

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