Support of the sharded collection

Description

In the sharded cluster environment following need to be accomplished in order to support ‘Selective restore with the name remapping’ (aka. cloning) feature:

  • add logic for cloning of sharded and unsharded collections:

    • cloning namesapce data itself

      • is it feasible: how to synchronize collection uuid between the shards? Is it possible to do that with mongorestore?

    • cloning metadata from config db

      • possible limitation: allow cloning within the same database

      • handling sharding key/index cloning

  • cloning indexes

  • applying PITR

    • there will be limitations: drop/create collection will not be possible

Environment

None

Activity

Show:

radoslaw.szulgo January 9, 2025 at 4:41 PM

From :

https://www.mongodb.com/docs/manual/administration/backup-sharded-clusters/
I'd like to comment, that's not comparable to PBM anyhow, simply because that procedure requires db to be offline for the duration of the backup (e.g. few hours):
To back up a sharded cluster with mongodump, you must stop the balancer, stop writes, and stop any schema transformation operations on the cluster.
Even if we take a cold backup, mongorestore has following significant limitation:
mongorestore does not shard restored collections on the destination cluster.
So sharding collection must be done manually for each sharded collection separately.
To conclude, mongotools backup/restore in sharded cluster is supported for the edge case (the user can tolerate to put db offline and do significant manual work during restore), but for most use cases, it is not supported.

Won't Do

Details

Assignee

Reporter

Needs QA

Yes

Priority

Smart Checklist

Created October 22, 2024 at 11:40 AM
Updated January 9, 2025 at 4:41 PM
Resolved January 9, 2025 at 4:41 PM

Flag notifications