Skip to content

Commit 895c410

Browse files
authored
Update neo4j-admin database restore syntax and options to reflect the code (#695)
Cherry-picked from #693
1 parent 40e3144 commit 895c410

File tree

1 file changed

+50
-53
lines changed

1 file changed

+50
-53
lines changed

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

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -28,89 +28,86 @@ This recovery operation is resource intensive and can be decoupled from the rest
2828

2929
[source,role=noheader]
3030
----
31-
32-
neo4j-admin database restore --from-path=<path>[,<path>...]
33-
[--overwrite-destination=<true/false>]
34-
[--restore-until=<recoveryCriteria>]
35-
[--to-path-data=<path>]
36-
[--to-path-txn=<path>]
37-
[--verbose]
38-
[--expand-commands]
39-
[--force]
40-
<database>
31+
neo4j-admin database restore [-h] [--expand-commands]
32+
[--verbose] [--overwrite-destination[=true|false]]
33+
[--additional-config=<file>]
34+
--from-path=<path>[,<path>...]
35+
[--restore-until=<recovery-criteria>]
36+
[--to-path-data=<path>] [--to-path-txn=<path>]
37+
[<database>]
4138
----
4239

40+
=== Parameters
41+
42+
.`neo4j-admin database restore` parameters
43+
[options="header", cols="1m,3a"]
44+
|===
45+
| Parameter
46+
| Description
47+
48+
|<database>
49+
|Name of the database after restore. Usage of this parameter is only allowed if the `--from-path` option points to a path to a single artifact.
50+
|===
51+
52+
4353
[[restore-backup-command-options]]
4454
=== Options
4555

46-
[options="header",cols="m,m,a"]
56+
.`neo4j-admin database restore` options
57+
[options="header", cols="5m,6a,4m"]
4758
|===
4859
| Option
49-
| Default
5060
| Description
61+
| Default
62+
63+
|--additional-config=<file>
64+
|Configuration file with additional configuration or override the existing configuration settings in the _neo4j.conf_ file.
65+
|
5166

52-
| --from-path
67+
|--expand-commands
68+
|Allow command expansion in config value evaluation.
5369
|
54-
| A single path or a comma-separated list of paths pointing to a backup artifact file.
70+
71+
|--from-path=<path>[,<path>...]
72+
|A single path or a comma-separated list of paths pointing to a backup artifact file.
5573
An artifact file can be 1) a full backup, in which case it is restored directly or, 2) a differential backup, in which case the command tries first to find in the folder a backup chain ending at that specific differential backup and then restores that chain.
74+
|
5675

57-
| --overwrite-destination
76+
|-h, --help
77+
|Show this help message and exit.
5878
|
59-
| Replace an existing database.
79+
80+
|--overwrite-destination[=true\|false]
81+
|If an existing database should be replaced.
6082
This option is not safe on a cluster since clusters have additional state that would be inconsistent with restored database.
6183
In a cluster, restore to a new database to avoid this problem.
84+
|false
6285

63-
| --restore-until
64-
|
65-
| Differential backup artifacts contains transaction logs that can be replayed and applied to stores contained in full backup artifacts when restoring a backup chain.
86+
|--restore-until=<recovery-criteria>
87+
| Differential backup artifacts contain transaction logs that can be replayed and applied to stores contained in full backup artifacts when restoring a backup chain.
6688
The database applies logs until the recovery predicate is satisfied.
6789
Currently supported predicates are: `<transaction>` and `<date>`.
6890

69-
- to restore a database up to a transaction id, the required transaction predicate should look like:
70-
`--restore-until=123`, where 123 is a provided
71-
transaction id.
91+
- to restore a database up to a transaction id, the required transaction predicate should look like `--restore-until=123`, where 123 is a provided transaction id.
7292
The restore recovers transaction logs up to - but not including - transaction 123.
7393

74-
- to restore a database up to a specific date, the required date predicate should look like:
75-
`--restore-until=2021-09-11 10:15:30`, where n2021-09-11 10:15:30 is a UTC date.
94+
- to restore a database up to a specific date, the required date predicate should look like `--restore-until=2021-09-11 10:15:30`, where n2021-09-11 10:15:30 is a UTC date.
7695
The restore recovers transactions that were committed before the provided date.
77-
78-
| --to-path-data
7996
|
80-
| Base directory for databases.
81-
Usage of this option is only allowed if the `--from-path` parameter points to one directory.
8297

83-
| --to-path-txn
84-
|
85-
| Base directory for transaction logs.
98+
| --to-path-data=<path>
99+
|Base directory for databases.
86100
Usage of this option is only allowed if the `--from-path` parameter points to one directory.
87-
88-
| --verbose
89101
|
90-
| Enable verbose output.
91102

92-
| --expand-commands
103+
|--to-path-txn=<path>
104+
|Base directory for transaction logs.
105+
Usage of this option is only allowed if the `--from-path` parameter points to one directory.
93106
|
94-
| Allow command expansion in config value evaluation.
95107

96-
| --additional-config
108+
|--verbose
109+
|Enable verbose output.
97110
|
98-
| Configuration file to provide additional or override the existing configuration settings in the _neo4j.conf_ file.
99-
|===
100-
101-
[[backup-backup-command-parameters]]
102-
=== Parameters
103-
104-
[options="header",cols="m,m,a"]
105-
|===
106-
| Parameter
107-
| Default
108-
| Description
109-
110-
| <database>
111-
|
112-
| Name for the restored database.
113-
114111
|===
115112

116113
[[restore-backup-example]]

0 commit comments

Comments
 (0)