Skip to content

Commit 0501341

Browse files
authored
replacing an existing database is only for EE (#1937) (#1944)
Cherry-picked from #1937
1 parent a31d633 commit 0501341

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

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

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
[[restore-dump]]
33
= Restore a database dump
44

5-
A database dump can be loaded to a Neo4j instance using the `load` command of `neo4j-admin`.
5+
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. +
6+
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.
67

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+
If you are replacing an existing database, you have to shut it down before running the command and use the `--overwrite-destination` option. +
9+
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.
10+
11+
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.
812

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

1519

16-
[[restore-dump-command]]
17-
== Command
18-
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-
21-
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.
22-
23-
The command can be run from an online or an offline Neo4j DBMS.
24-
25-
If you are replacing an existing database, you have to shut it down before running the command.
26-
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.
27-
28-
`neo4j-admin database load` must be invoked as the `neo4j` user to ensure the appropriate file permissions.
29-
3020

3121
[[restore-dump-syntax]]
32-
=== Syntax
22+
== Syntax
3323

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

40-
=== Description
30+
== Description
4131

4232
Load a database from an archive.
4333
_<archive-path>_ must be a directory containing an archive(s).
@@ -47,18 +37,18 @@ Existing databases can be replaced by specifying `--overwrite-destination`.
4737
It is not possible to replace a database that is mounted in a running Neo4j server.
4838
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.
4939

50-
=== Parameters
40+
== Parameters
5141

5242
.`neo4j-admin database load` parameters
5343
[options="header", cols="5m,10a"]
5444
|===
5545
| Parameter
5646
| Description
5747
|<database>
58-
|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.
48+
|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.
5949
|===
6050

61-
=== Options
51+
== Options
6252

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

110100
[[restore-dump-example]]
111-
== Example
101+
== Examples
112102

113103
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.
114104
When replacing an existing database, you have to shut it down before running the command.

0 commit comments

Comments
 (0)