Skip to main content
Use this when you need tenant data from MongoDB Atlas in a local MongoDB that Meridian’s backend already points at via 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 using mongodump.
  1. Export the database Use mongodump with the Atlas URI from Meridian/backend/.env (for example MONGO_URI_RPI, MONGODB_URI, or the Atlas SRV string used for that tenant). Pick a writable dump directory (examples: ~/dump on macOS/Linux, C:\temp\meridian-dump on Windows):
    mongodump --uri="<ATLAS_URI_FROM_ENV>" --out=/path/to/dump
    
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 with mongorestore.
  1. Import the database Run mongorestore with the dump path and the database name (e.g. studycompass):
    mongorestore --db studycompass --drop /path/to/dump/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).
Use the same database name locally that Meridian expects (often studycompass or the tenant DB name in .env). Replace /path/to/dump/... with the actual dump path from step 1.

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.