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 database load
command loads a database from an archive created with the neo4j-admin database dump
command.
Alternatively, neo4j-admin database load
can accept a dump from standard input, enabling it to accept input from neo4j-admin database dump
or another source.
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 database load
must be invoked as the neo4j
user to ensure the appropriate file permissions.
Syntax
neo4j-admin database load [-h]
[--verbose]
[--expand-commands]
[--info]
[--overwrite-destination[=true|false]]
[--from-path=<path> | --from-stdin]
[--additional-config=<file>]
<database>
<database> — Name of the database to load.
Can contain *
and ?
for globbing.
Options
Option | Default | Description |
---|---|---|
|
Enable verbose output. |
|
|
Allow command expansion in config value evaluation. |
|
|
Print meta-data information about the archive file, such as file count, byte count, and format of the load file. |
|
|
|
If an existing database should be replaced. |
|
Path to the directory containing archive(s) created with the |
|
|
Read dump from standard input. |
|
|
|
Configuration file with additional configuration. |
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 database load
command.
When replacing an existing database, you have to shut it down before running the command.
bin/neo4j-admin database load --from-path=/dumps/neo4j neo4j --overwrite-destination
Unless you are replacing an existing database, you must create the database (using |
When using the |
|
Was this page helpful?