How to back up a Neo4j Docker container (2026)

Neo4j needs a consistent dump before it touches restic. Dockstash runs `neo4j-admin database dump neo4j --to-path=/backup` inside the container, captures the output, and stores it encrypted off-site — it never copies /data live, because neo4j-admin dump (or the Enterprise online backup) produces a consistent store snapshot, since the live graph store and transaction logs are written continuously.

Detection

What Dockstash detects

Env keys detectedNEO4J_AUTH, NEO4J_dbms_default__database, NEO4J_PLUGINS
Default port7687
Live data paths (never copied live)/data, /data/databases, /data/transactions
Example imagesneo4j:5, neo4j:5-community, neo4j:5-enterprise, neo4j
Commands

The dump command

neo4j-admin database dump neo4j --to-path=/backup

The restore command

neo4j-admin database load neo4j --from-path=/backup --overwrite-destination=true

neo4j-admin dump (or the Enterprise online backup) produces a consistent store snapshot, since the live graph store and transaction logs are written continuously.

The gotchas

Gotchas to avoid

  • On Community edition, `neo4j-admin database dump` requires the database to be stopped — dumping a live store is not supported and copying /data live is inconsistent.
  • Enterprise edition supports online hot backups via `neo4j-admin database backup`; Community must schedule a brief stop or dump a secondary.
  • The Bolt port (7687) is for clients; backups run through neo4j-admin inside the container, not over Bolt.

Do it in one click with Dockstash

Dockstash runs the exact dump above, restics it off-site, and drill-tests the restore automatically — no script to maintain.

Start free All guides

Last updated: July 2026

Frequently asked questions

Can I back up Neo4j without stopping it?

On Enterprise, yes — use `neo4j-admin database backup` for an online hot backup. On Community, the `database dump` command needs the database stopped, so Dockstash schedules a brief stop or dumps a replica.

Why not copy the /data/databases directory?

The graph store and transaction logs are written continuously. A live copy is inconsistent and may not load. neo4j-admin dump/backup produce a consistent, restorable artifact.

How do I restore a Neo4j dump?

Use `neo4j-admin database load ... --overwrite-destination=true` against a stopped target, then start Neo4j. Dockstash loads into a staging database before any overwrite.

Does the backup include installed plugins?

No — plugins (APOC, GDS) are part of the image/config, not the database dump. Ensure the restore-target image has the same plugins before loading.