-
Notifications
You must be signed in to change notification settings - Fork 83
Update the load command description as it supports full backups
#1594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c54ff55
Update the `load` command description as it supports full backups
NataliaIvakina 6313bf2
Apply suggestions from code review
NataliaIvakina f6b27aa
Update modules/ROOT/pages/backup-restore/restore-dump.adoc
NataliaIvakina 53633bb
Update restore-dump.adoc
NataliaIvakina b4ba020
Update restore-dump.adoc
NataliaIvakina 79f1d44
Update examples
NataliaIvakina 17c113b
Merge branch 'dev' into dev-command-update
NataliaIvakina 907ac07
Apply suggestions from code review
NataliaIvakina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
|
@@ -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. | ||
|
|
@@ -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 | ||
|
|
@@ -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] | ||
|
|
@@ -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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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._ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.