-
Type:
Task
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: mongorestore
-
2
-
Tools and Replicator
-
0.25
-
Needed
-
Summary
The archive format includes a header that identifies the server version:
type Header struct { ConcurrentCollections int32 `bson:"concurrent_collections"` FormatVersion string `bson:"version"` ServerVersion string `bson:"server_version"` ToolVersion string `bson:"tool_version"` }
mongorestore should, when restoring from the archive format, check this version and, if it differs from its own server version, warn appropriately about the lack of support and danger to data integrity.
What about non-archive backups?
The directory format, unfortunately, does not include details about the server version, so there’s no win to achieve there without a change to mongodump.
How does this relate to TOOLS-3510?
TOOLS-3510 envisions a stronger stance on data integrity, which requires more code changes and possibly a major version change.
This ticket is a “quick win” that we can do in a few minutes. It won’t disrupt anyone’s workflow, but it’ll hopefully dissuade at least some users from “self-harm”.
- related to
-
TOOLS-3510 Mongodump/Mongorestore version based guardrails
-
- Backlog
-