A backup you haven't restored isn't a backup
Migrating from MongoDB Atlas to a self-hosted replica set bought us control and cut our bill. It also quietly removed something we had stopped thinking about: Atlas had been taking continuous backups for us the entire time. After the migration, production data for Prochesta lived in /var/db/mongo on a single VPS. No snapshots. No off-box copy. A rm -rf , a bad migration script, or a dead disk…
Prochesta's migration from MongoDB Atlas to a self-hosted replica set brought control and reduced costs, but it also led to the discovery of a crucial backup oversight. Atlas had been continuously backing up their data, but with the new setup, they were relying on a single VPS without snapshots or off-site copies. This meant that a single misstep could have led to catastrophic data loss.
They had planned for backups as a follow-up task, but the true priority was to recover to any arbitrary moment, not just a nightly snapshot. The community version of MongoDB doesn't support physical backups, which are faster and less resource-intensive compared to logical backups. This limitation led them to choose Percona Backup for MongoDB (PBM), which provided physical backups and could store data in Cloudflare R2.
They built a backup tool called mongopit, which takes daily full backups at night, stores them on R2, and uses the oplog for point-in-time recovery. Their backup system is optimized for object storage semantics, using R2's S3-compatible API, predictable rate limits, and flat key namespace. This setup allows them to run backup rehearsals with zero bandwidth cost and ensures that their backups are reliable and easily recoverable.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.