How to back up NocoDB in Docker (2026)
NocoDB spreads its state across its PostgreSQL and MySQL databases and 2 data volumes on disk, plus compose and .env config. A backup that skips any layer will not restore cleanly. Dockstash auto-detects each layer, dumps the database from inside the container, and stores the lot off-site with restic.
What NocoDB stores
| Compose services | nocodb, postgres |
|---|---|
| Databases detected | postgres, mysql |
| Data volumes | nc_data (/usr/app/data), db_data (/var/lib/postgresql/data) |
| Config paths | docker-compose.yml, .env |
The backup plan
- Dump the metadata database. Run pg_dumpall (or mysqldump --single-transaction) against the NocoDB metadata database to capture bases, views, and user/project configuration consistently.
- Capture the NocoDB data directory. Restic the /usr/app/data volume, which holds uploaded attachments and, for SQLite-backed setups, the metadata database file itself.
- Capture compose and .env config. Restic docker-compose.yml and .env, including NC_AUTH_JWT_SECRET, so authentication tokens remain valid after restore.
Restoring NocoDB
NocoDB stores project metadata in its metadata database and uploaded attachments under /usr/app/data — restore both. Preserve NC_AUTH_JWT_SECRET or existing sessions and shared-view tokens break. If NocoDB connects to external databases, those have their own backups.
Back up NocoDB in one click All guides
Last updated: July 2026
Related database guides
Frequently asked questions
What does NocoDB store in its metadata database?
Base definitions, views, grid/gallery configs, users, and project settings. A consistent dump of this metadata database captures the structure of your NocoDB workspace.
Where are uploaded attachments?
In the /usr/app/data volume (or configured object storage). Back it up alongside the metadata database so attachment references resolve.
What about the databases NocoDB connects to?
Those external data sources are backed up independently. For NocoDB itself, back up the metadata database, the data volume, and the JWT secret.