Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions modules/ROOT/pages/backup-restore/restore-backup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

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`.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave this command out of this page, but we can discuss it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my idea was to represent this new feature here as well because if you use EE and backups you don't need to go to the Restore dump page and you won't be aware of this new functionality.

This functionality is available in the Community Edition.

[NOTE]
====
Restoring a database backup to a previous Neo4j version is not supported.
Expand Down
31 changes: 25 additions & 6 deletions modules/ROOT/pages/backup-restore/restore-dump.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@

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

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].

[NOTE]
====
Change Data Capture does **not** capture any data changes resulting from the use of `neo4j-admin database load`.
See link:{neo4j-docs-base-uri}/cdc/current/getting-started/key-considerations/#non-tx-log-changes[Change Data Capture -> Key considerations] for more information.
See link:{neo4j-docs-base-uri}/cdc/current/get-started/self-managed/#non-tx-log-changes[Change Data Capture -> Key considerations] for more information.
====


[[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.
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.
Expand All @@ -37,7 +40,8 @@ neo4j-admin database load [-h] [--expand-commands] [--info] [--verbose] [--overw
=== Description

Load a database from an archive.
_<archive-path>_ must be a directory containing an archive(s) created with the dump command.
_<archive-path>_ must be a directory containing an archive(s).
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.
If neither `--from-path` or `--from-stdin` is supplied `server.directories.dumps.root` setting will be searched for the archive.
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.
Expand Down Expand Up @@ -74,11 +78,11 @@ If `--info` is specified, then the database is not loaded, but information (i.e.
|

|--from-path=<path>
|Path to a directory containing archive(s) created with the dump command.
|Path to a directory containing archive(s).
|

|--from-stdin
|Read dump from standard input.
|Read archive from standard input.
|

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

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

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

Starting from Neo4j 5.20, you can use the same command to load the database from its full backup artifact:

[source,shell, role="nocopy"]
----
bin/neo4j-admin database load --from-path=/full-path/to/backups <database> --overwrite-destination=true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the path shouldn't point to the artifact as it does in the neo4j-admin database restore command.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, I think it's redundant in this case

----

The following example shows how to designate a specific archive for the `load` command.

[source,shell, role="nocopy"]
----
cat foo.dump | neo4j-admin database load --from-stdin mydatabase
----

=== Load a dump from an AWS S3 storage

_This feature is available from Neo4j 5.19._
Expand Down