To export a Neo4j database, you can use the neo4j-admin dump command. This command creates a logical backup of your database, including all nodes, relationships, and properties, and stores them in a tar archive file.

You can then use this file to restore the database on another Neo4j instance or to perform a point-in-time recovery.

Here is the basic syntax for the neo4j-admin dump command:


neo4j-admin dump [--database=<name>] [--to=<path>] [--force]

The –database option specifies the name of the database to be backed up (e.g., graph.db).

The –to option specifies the location where the tar archive file should be stored.

The –force option forces the command to overwrite any existing dump file with the same name.

Here is an example of how to use the neo4j-admin dump command to create a logical backup of the graph.db database and store it in the /tmp directory:


neo4j-admin dump --database=graph.db --to=/tmp/graph.db.tar

To restore the database from the tar archive file, you can use the neo4j-admin load command.

This command restores the database from the tar archive file and overwrites any existing data in the database.

Here is the basic syntax for the neo4j-admin load command:


neo4j-admin load [--from=<path>] [--database=<name>] [--force]

The --from option specifies the location of the tar archive file to be restored. The --database option specifies the name of the database to be restored (e.g., graph.db).

The --force option forces the command to overwrite any existing data in the database.

Here is an example of how to use the neo4j-admin load command to restore the graph.db database from the tar archive file stored in the /tmp directory:


neo4j-admin load --from=/tmp/graph.db.tar --database=graph.db

Keep in mind that the neo4j-admin dump and neo4j-admin load commands are only available in Neo4j versions 3.0 and later.

If you are using an earlier version of Neo4j, you can use the neo4j-backup command to create a physical backup of your database.

Let us know your comments on how to export neo4j database.