[SERVER-10675] Mongodump Restore Created: 04/Sep/13  Updated: 10/Dec/14  Resolved: 09/Sep/13

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Siva Balasubramaniam Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

A database dump was taken using version 2.4.5, can it be restored to different version say 2.4.6 using mongorestore?



 Comments   
Comment by Siva Balasubramaniam [ 09/Sep/13 ]

HI Dan,

We had authentication enabled. I took a mongodump from 2.4.5 and tried to restored on 2.4.6. In 2.4.6 we had to grant admin user with the following roles.

"dbAdminAnyDatabase","clusterAdmin","userAdminAnyDatabase", "userAdmin". Role "readWriteAnyDatabase" was missing, which I added after seeing user response.

Thanks

Siva

Comment by Daniel Pasette (Inactive) [ 09/Sep/13 ]

If you know the cause of the error, it would be great if you could leave a note explaining it here so that other users may benefit.
Thanks
Dan

Comment by Siva Balasubramaniam [ 09/Sep/13 ]

Hi Dan,
You may close this case, as I was able to restore successfully.
Thanks
Siva

Comment by Daniel Pasette (Inactive) [ 09/Sep/13 ]

Can you supply the complete command line arguments you use to start your mongod and mongorestore processes as well as attach the entire log output of mongorestore?

Comment by Siva Balasubramaniam [ 04/Sep/13 ]

Hi,
When source and destination were 2.4.5, there were no issues with mongorestore. But when Source mongo db version 2.4.5 and destination version 2.4.6 we are getting the following errors.

Assertion: 13111:field not found, expected type 2
0xddf081 0xda217b 0xda26bc 0x6d74dd 0x6e5d7b 0x6e3c4b 0x6e7f5c 0xd95dd8 0xd9afd5 0x6cd167 0x3e4841ecdd 0x6ccfd9
mongorestore(_ZN5mongo15printStackTraceERSo+0x21) [0xddf081]
mongorestore(_ZN5mongo11msgassertedEiPKc+0x9b) [0xda217b]
mongorestore() [0xda26bc]
mongorestore(_ZNK5mongo11BSONElement3chkEi+0x1fd) [0x6d74dd]
mongorestore(_ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb+0x24bb) [0x6e5d7b]
mongorestore(_ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb+0x38b) [0x6e3c4b]
mongorestore(_ZN7Restore5doRunEv+0xc7c) [0x6e7f5c]
mongorestore(_ZN5mongo8BSONTool3runEv+0x458) [0xd95dd8]
mongorestore(_ZN5mongo4Tool4mainEiPPc+0x13d5) [0xd9afd5]
mongorestore(main+0x37) [0x6cd167]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3e4841ecdd]
mongorestore(__gxx_personality_v0+0x459) [0x6ccfd9]
assertion: 13111 field not found, expected type 2

Thanks
Siva

Comment by Eliot Horowitz (Inactive) [ 04/Sep/13 ]

Yes. mongodump/restore works off raw bson so works will all versions

Generated at Thu Feb 08 03:23:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.