Neo4j Backup and Restore(Dump and Load)

In this article, we will talk about Neo4j backup and restore operations.

Neo4j Offline Backup

Let’s take Offline backup of Neo4j Graph Database.

It is backed up using Neo4j’s admin tool and the service must be stopped for offline backup.

Sytanx:

db-folder: We write the names of the databases that we will be backing up here. You can find the database names by accessing the folder where the databases are located.

db-target-folder: We write the path information to get dump.

db-dump-file: We enter the name of dump file.

Example

Let’s perform these steps for our own neo4j database:

As you can see, we have accessed our database name.

Database Name: graph.db

We prepared our script using the neo4j-admin tool as below.

We have successfully backed up our database(as dump).

Let’s go to the folder and check the dump.

Neo4j Load Dump Backup(Restore)

At this stage, we will learn how to restore Neo4j Graph Database dumps.

Let’s restore Dump step by step.

Sytanx:

archive-path: path information containing dump

database: database information to restore dump

Example:

Let’s perform this step for our own neo4j dump we created above: