Question

Error creating index while mongorestore the dump into the db

Posted October 6, 2015 7.2k views
MongoDB

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

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.

1 answer

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

Submit an Answer