We've had an error during mongorestore.
This was the error mensage:
Error creating index admin.system.users: 11000 E11000 duplicate key error index: admin.system.users.$id dup key: { : ObjectId('4d8352711a9f859ddd7de952') }
We'd used the --drop option on mongorestore, but it created the users again without removes them. Because that, it generated the error during index creation.
The command used for backup:
mongodump -h HOST -uUSER -pPWD -vvvvv -o backupDIR/
The command used for restore:
mongorestore -h HOST -uUSER -pPWD --drop -vvvvv backupDIR/
The complete restore log:
Tue Mar 29 16:09:52 creating new connection to:HOST
Tue Mar 29 16:09:52 BackgroundJob starting:
connected to: to:HOST
Tue Mar 29 16:09:52 drillDown: backupDIR/
Tue Mar 29 16:09:52 drillDown: backupDIR/admin
Tue Mar 29 16:09:52 drillDown: backupDIR/admin/system.users.bson
Tue Mar 29 16:09:52 backupDIR/admin/system.users.bson
Tue Mar 29 16:09:52 going into namespace [admin.system.users]
Tue Mar 29 16:09:52 dropping
Tue Mar 29 16:09:52 file size: 368
Tue Mar 29 16:09:52 4 objects found
Tue Mar 29 16:09:52 drillDown: backupDIR/admin/system.indexes.bson
Tue Mar 29 16:09:52 backupDIR/admin/system.indexes.bson
Tue Mar 29 16:09:52 going into namespace [admin.system.indexes]
Tue Mar 29 16:09:52 dropping
Tue Mar 29 16:09:52 file size: 158
Tue Mar 29 16:09:52 { name: "id", ns: "admin.system.users", key:
, v: 0 }
Error creating index admin.system.users: 11000 E11000 duplicate key error index: admin.system.users.$id dup key: { : ObjectId('4d8352711a9f859ddd7de952') }
To resume index restoration, run mongorestore on file backupDIR/admin/system.indexes.bson manually.
Aborted