[SERVER-41202] admin.system.version is not restored by mongorestore Created: 17/May/19  Updated: 22/May/19  Resolved: 22/May/19

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

Type: Question Priority: Major - P3
Reporter: Gennadiy Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by TOOLS-481 Read the admin.system.version collect... Closed
Related
is related to DOCS-12743 Revise shardIdentity update instructi... Closed
Participants:

 Description   

Hello,

Following the procedure of restoring a sharded cluster from backup (https://docs.mongodb.com/manual/tutorial/restore-sharded-cluster/#optional-for-any-csrs-hostname-or-replica-set-name-changes-update-shard-metadata-in-each-shard-s-identity-document)

I stumbled upon an issue.

There is this step:

use admin
db.system.version.deleteOne( { _id: "minOpTimeRecovery" } )

and

db.system.version.updateOne(
{ "_id" : "shardIdentity" },

{ $set : \{ "configsvrConnectionString" : "myNewCSRSName/config1.example.net:27019,config2.example.net:27019,config3.example.net:27019"}

}
)

however having restored my backup (dump created by mongodump), system.version collection contains only the following documents

{ "_id" : "featureCompatibilityVersion", "version" : "4.0" } { "_id" : "authSchema", "currentVersion" : 5 }

.

Seems that mongorestore ignores system.version collection.

I see in my backup log that system.version is written to the dup directory, and I can see the files in the backup dir.
rw-rr- 1 root root 134 May 17 14:12 system.version.metadata.json
rw-rr- 1 root root 716 May 17 14:12 system.version.bson

But when I run mongorestore it restores everythin but the system.version collection (I am restoring all databases, without any filters)
I restore to a mongod instance that doesn't have accsess control enabled at all.

I end up inserting the document into system.version

db.system.version.insertOne(

{ "_id" : "shardIdentity", "clusterId" : ObjectId("***"), "shardName" : "****", "configsvrConnectionString" : "***/****:****,****:*****,****:****" }

)

In the end when i am done with restoring all shards, the sharded cluster works without any issues.

Is there a way to force mongorestore restore the admin.system.version collection? or Am I missing something here?

Thanks for your assistance in advance.
Best regards



 Comments   
Comment by Eric Sedor [ 22/May/19 ]

We have opened DOCS-12743 to update the documentation. Thank you for your report!

Comment by Eric Sedor [ 22/May/19 ]

genacvali91 we have confirmed that this is a documentation issue prompted by TOOLS-481 and apologize for that confusion.

Comment by Eric Sedor [ 21/May/19 ]

Hi genacvali91. We can reproduce the behavior you are seeing and are determining if this is a documentation issue or if that collection should be restored.

Thanks for your patience.

Comment by Gennadiy [ 18/May/19 ]

Hello,

 

Any updates?

Generated at Thu Feb 08 04:57:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.