How to use an externally stored backup snapshot to restore a sharded cluster?

I found this post useful in figuring out how to replicate a cluster’s snapshots to an external location (in our case, an s3 bucket): Moving existing atlas mongo snapshots to external storage

However, I am now wondering if there is any documentation on how to restore a sharded cluster from an externally stored snapshot.

The scenario in this case is that someone either accidentally or maliciously deletes a mongo project (thus also deleting all backups). How would one go about creating a new cluster from an externally stored snapshot?

What if the cluster was encrypted at rest? Are the snapshots also encrypted? Would one need the old encryption key to be able to restore the snapshot to a new cluster?

1 Like

At a high level, you would start a sharded cluster, with each shard configured as a single node replica set pointed to the local backup data: then you could leverage Atlas live migration to move that data back into Atlas. (For completeness you could also mongodump piped to mongorestore as an alternative to live migration. This latter option works as long as the data does not change, if it does then live migration is required)

If the backup snapshots leverage mongodb’s encrypted storage engine, then you will need to have access to a key to start the mongod processes with access to that key so that they can in turn process the data