https://neo4j.com/docs/operations-manual/current/tools/dump-load/
Dump and load databases
neo4j-admin dump --database=<database> --to=<destination-path>
neo4j-admin load --from=<archive-path> --database=<database> [--force]
Dump the database called graph.db
into a file called /backups/graph.db/2016-10-02.dump
. The destination directory for the dump file — in this case /backups/graph.db — must exist before calling the command.
$neo4j-home> bin/neo4j-admin dump --database=graph.db --to=/backups/graph.db/2016-10-02.dump
$neo4j-home> ls /backups/graph.db
$neo4j-home> 2016-10-02.dump
Load the backed-up database contained in the file /backups/graph.db/2016-10-02.dump
into database graph.db
. Since we have a database running, we first have to shut it down. When we use the --force
option, any existing database gets overwritten.
$neo4j-home> bin/neo4j stop
Stopping Neo4j.. stopped
$neo4j-home> bin/neo4j-admin load --from=/backups/graph.db/2016-10-02.dump --database=graph.db --force