Meridian/backend/.env. The Atlas connection string is the same credential set used for that environment (staging snapshot, shared dev cluster, etc.)—not checked into this documentation.
Step 1: Export the MongoDB Atlas Database
Export the Atlas database to a BSON dump usingmongodump.
-
Export the database
Use
mongodumpwith the Atlas URI fromMeridian/backend/.env(for exampleMONGO_URI_RPI,MONGODB_URI, or the Atlas SRV string used for that tenant). Pick a writable dump directory (examples:~/dumpon macOS/Linux,C:\temp\meridian-dumpon Windows):
The dump directory is disposable after
mongorestore; keep it off shared drives if the snapshot contains PII.Step 2: Import the dump into local MongoDB
Import the BSON dump withmongorestore.
-
Import the database
Run
mongorestorewith the dump path and the database name (e.g.studycompass):
mongodump writes a folder per database name under --out. Point mongorestore at that inner folder (for example .../dump/studycompass if the database name is studycompass).studycompass or the tenant DB name in .env). Replace /path/to/dump/... with the actual dump path from step 1.
Related pages
Getting started
.env and Mongo URIs this restore process must match.Development
Running the backend against your local database after restore.
Multi-tenant identity
How tenant DB names and the global DB relate when testing SSO locally.
Deployment
Database checklist items before promoting schema or data-dependent changes.
Meridian CLI
Workspace layout and branch flow around the same mono-repo.
Testing
Run tests after a restore when validating multi-tenant behavior.