Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 12 additions & 22 deletions modules/ROOT/pages/backup-restore/restore-dump.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
[[restore-dump]]
= Restore a database dump

A database dump can be loaded to a Neo4j instance using the `load` command of `neo4j-admin`.
The `neo4j-admin database load` command can be used to load a database from an archive created with the xref:backup-restore/offline-backup.adoc#offline-backup-command[`neo4j-admin database dump`] command. +
Starting from Neo4j 5.20, the `neo4j-admin database load` command also supports loading a full backup artifact created by the xref:backup-restore/online-backup.adoc[`neo4j-admin database backup`] command from Neo4j Enterprise.

From Neo4j 5.20, the `neo4j-admin database load` command also supports loading a database from xref:backup-restore/online-backup.adoc#backup-artifact[full database backup artifacts].
If you are replacing an existing database, you have to shut it down before running the command and use the `--overwrite-destination` option. +
label:enterprise-edition[] 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.

The command can be run from either an online or offline Neo4j DBMS, and it must be executed as the `neo4j` user to ensure the appropriate file permissions.

[NOTE]
====
Expand All @@ -13,31 +17,17 @@ See link:{neo4j-docs-base-uri}/cdc/current/get-started/self-managed/#non-tx-log-
====


[[restore-dump-command]]
== Command

The `neo4j-admin database load` command loads a database from an archive created with the xref:backup-restore/offline-backup.adoc#offline-backup-command[`neo4j-admin database dump`] command or from xref:backup-restore/online-backup.adoc#online-backup-command[full Neo4j Enterprise backup] (available from Neo4j 5.20).

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.


[[restore-dump-syntax]]
=== Syntax
== Syntax

[source,role=noheader]
----
neo4j-admin database load [-h] [--expand-commands] [--info] [--verbose] [--overwrite-destination[=true|false]]
[--additional-config=<file>] [--from-path=<path> | --from-stdin] <database>
----

=== Description
== Description

Load a database from an archive.
_<archive-path>_ must be a directory containing an archive(s).
Expand All @@ -47,18 +37,18 @@ Existing databases can be replaced by specifying `--overwrite-destination`.
It is not possible to replace a database that is mounted in a running Neo4j server.
If `--info` is specified, then the database is not loaded, but information (i.e. file count, byte count, and format of load file) about the archive is printed instead.

=== Parameters
== Parameters

.`neo4j-admin database load` parameters
[options="header", cols="5m,10a"]
|===
| Parameter
| Description
|<database>
|Name of the database to load. Can contain `\*` and `?` for globbing. Note that `*` and `?` have special meaning in some shells and might need to be escaped or used with quotes.
|Name of the database to load. Can contain * and ? for globbing. Note that * and ? have special meaning in some shells and might need to be escaped or used with quotes.
|===

=== Options
== Options

.`neo4j-admin database load` options
[options="header", cols="5m,10a,2m"]
Expand Down Expand Up @@ -108,7 +98,7 @@ For more information, see <<load-dump-cloud-storage>>.
====

[[restore-dump-example]]
== Example
== Examples

The following are examples of how to load a dump of a database (_database.dump_) created in the section xref:backup-restore/offline-backup.adoc#offline-backup-example[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.
Expand Down