Skip to content

Commit bb02b36

Browse files
Update the load command description as it supports full backups (neo4j#1594)
Co-authored-by: Reneta Popova <reneta.popova@neo4j.com>
1 parent ff2bca1 commit bb02b36

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

modules/ROOT/pages/backup-restore/restore-backup.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
A database backup artifact (full or differential) can be restored within the same or to a later Neo4j version using the `restore` command of `neo4j-admin`.
1010

11+
Starting with Neo4j 5.20, you can load a **full** database backup artifact using the xref:backup-restore/restore-dump.adoc#restore-dump-command[`neo4j-admin database load`] command.
12+
This functionality is available in the Community Edition.
13+
1114
[NOTE]
1215
====
1316
Restoring a database backup to a previous Neo4j version is not supported.

modules/ROOT/pages/backup-restore/restore-dump.adoc

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
A database dump can be loaded to a Neo4j instance using the `load` command of `neo4j-admin`.
66

7+
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].
8+
79
[NOTE]
810
====
911
Change Data Capture does **not** capture any data changes resulting from the use of `neo4j-admin database load`.
@@ -14,7 +16,8 @@ See link:{neo4j-docs-base-uri}/cdc/current/get-started/self-managed/#non-tx-log-
1416
[[restore-dump-command]]
1517
== Command
1618

17-
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.
19+
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).
20+
1821
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.
1922

2023
The command can be run from an online or an offline Neo4j DBMS.
@@ -37,7 +40,8 @@ neo4j-admin database load [-h] [--expand-commands] [--info] [--verbose] [--overw
3740
=== Description
3841

3942
Load a database from an archive.
40-
_<archive-path>_ must be a directory containing an archive(s) created with the dump command.
43+
_<archive-path>_ must be a directory containing an archive(s).
44+
Archive can be a database dump created with the dump command, or can be a full backup artifact created by the backup command from Neo4j Enterprise.
4145
If neither `--from-path` or `--from-stdin` is supplied `server.directories.dumps.root` setting will be searched for the archive.
4246
Existing databases can be replaced by specifying `--overwrite-destination`.
4347
It is not possible to replace a database that is mounted in a running Neo4j server.
@@ -74,11 +78,11 @@ If `--info` is specified, then the database is not loaded, but information (i.e.
7478
|
7579

7680
|--from-path=<path>
77-
|Path to a directory containing archive(s) created with the dump command.
81+
|Path to a directory containing archive(s).
7882
|
7983

8084
|--from-stdin
81-
|Read dump from standard input.
85+
|Read archive from standard input.
8286
|
8387

8488
|-h, --help
@@ -114,7 +118,8 @@ If you are not replacing an existing database, you must create the database (usi
114118

115119
[TIP]
116120
====
117-
The command looks for a file called _<database>.dump_ where `<database>` is the database specified in the command.
121+
The command looks for a file called _<database>.dump_ where `<database>` is the database specified in the command. +
122+
As of Neo4j 5.20, the command also looks for a full backup artifact.
118123
====
119124

120125
[NOTE]
@@ -140,6 +145,20 @@ You can load a dump from a local directory using the following command:
140145
bin/neo4j-admin database load --from-path=/full-path/data/dumps <database> --overwrite-destination=true
141146
----
142147

148+
Starting from Neo4j 5.20, you can use the same command to load the database from its full backup artifact:
149+
150+
[source,shell, role="nocopy"]
151+
----
152+
bin/neo4j-admin database load --from-path=/full-path/to/backups <database> --overwrite-destination=true
153+
----
154+
155+
The following example shows how to designate a specific archive for the `load` command.
156+
157+
[source,shell, role="nocopy"]
158+
----
159+
cat foo.dump | neo4j-admin database load --from-stdin mydatabase
160+
----
161+
143162
=== Load a dump from an AWS S3 storage
144163

145164
_This feature is available from Neo4j 5.19._

0 commit comments

Comments
 (0)