-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.4
-
Component/s: Admin
-
None
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" },
}
)
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
- is caused by
-
TOOLS-481 Read the admin.system.version collection but do not restore it
- Closed