Restore a database dump
A database dump can be loaded to a Neo4j instance using the load
command of neo4j-admin
.
Command
The neo4j-admin load
command loads a database from an archive created with the neo4j-admin dump
command.
The command can be run from an online or an offline Neo4j DBMS.
If you are replacing an existing database, you have to shut it down before running the command.
If you are not replacing an existing database, you must create the database (using CREATE DATABASE
against the system
database) after the load operation finishes.
neo4j-admin load
must be invoked as the neo4j
user to ensure the appropriate file permissions.
Options
Option | Default | Description |
---|---|---|
|
Enable verbose output. |
|
|
Path to archive created with the |
|
|
|
Name for the loaded database. |
|
Replace an existing database. |
|
|
Print meta-data information about the archive file, such as, file count, byte count, and format of the load file. |
Example
The following is an example of how to load the dump of the neo4j
database created in the section Back up an offline database, using the neo4j-admin load
command.
When replacing an existing database, you have to shut it down before running the command.
bin/neo4j-admin load --from=/dumps/neo4j/neo4j-<timestamp>.dump --database=neo4j --force
Unless you are replacing an existing database, you must create the database (using |
When using the |