Error creating index while mongorestore the dump into the db

October 6, 2015 6.4k 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
1 Answer

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

Have another answer? Share your knowledge.