diff --git a/modules/ROOT/pages/backup-restore/restore-dump.adoc b/modules/ROOT/pages/backup-restore/restore-dump.adoc index fca02216f..402c99542 100644 --- a/modules/ROOT/pages/backup-restore/restore-dump.adoc +++ b/modules/ROOT/pages/backup-restore/restore-dump.adoc @@ -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] ==== @@ -13,23 +17,9 @@ 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] ---- @@ -37,7 +27,7 @@ neo4j-admin database load [-h] [--expand-commands] [--info] [--verbose] [--overw [--additional-config=] [--from-path= | --from-stdin] ---- -=== Description +== Description Load a database from an archive. __ must be a directory containing an archive(s). @@ -47,7 +37,7 @@ 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"] @@ -55,10 +45,10 @@ If `--info` is specified, then the database is not loaded, but information (i.e. | Parameter | Description | -|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"] @@ -108,7 +98,7 @@ For more information, see <>. ==== [[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.