Docs / Surfaces / Databases / MongoDB

MongoDB

SafeGrd backs up MongoDB 7 and 8 with mongodump. This page covers what the host needs, what the archive holds, and how a restore works.

# MongoDB 7 and 8 (each run by the test suite)
safegrd backup --database-url "mongodb://backup:$DB_PASSWORD@db.internal:27017/app?authSource=admin" --retention-days 14

MongoDB surfaces capture database archives using native mongodump --archive, streaming data directly into the snapshot stream. Because the archive uses MongoDB's standard format, it can be restored directly with mongorestore independently of SafeGrd. Document counts and collection checksums generated by mongodump are validated as the stream passes.