Skip to content

Commit 716ca42

Browse files
authored
Update neo4j-admin database check syntax and options to reflect the code (#687)
Cherry-picked from #682
1 parent 4bf2a83 commit 716ca42

File tree

1 file changed

+82
-74
lines changed

1 file changed

+82
-74
lines changed

modules/ROOT/pages/tools/neo4j-admin/consistency-checker.adoc

Lines changed: 82 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,114 +4,122 @@
44

55
You can use the `neo4j-admin database check` command to check the consistency of a database, a dump, or a backup.
66
The `neo4j-admin` tool is located in the _/bin_ directory.
7-
If checking the consistency of a database, note that it has to be stopped first or else the consistency check will result in an error.
8-
9-
[NOTE]
10-
====
11-
It is not recommended to use an NFS to check the consistency of a database, a dump, or a backup as this slows the process down significantly.
12-
====
137

148
== Syntax
159

1610
The `neo4j-admin database check` command has the following syntax:
1711

12+
[source,role=noheader]
1813
----
19-
neo4j-admin database check [-h]
20-
[--expand-commands]
21-
[--force]
22-
[--verbose]
23-
[--check-counts[=true|false]]
24-
[--check-graph[=true|false]]
25-
[--check-indexes[=true|false]]
26-
[--check-property-owners[=true|false]]
27-
[--additional-config=<file>]
28-
[--max-off-heap-memory=<size>]
29-
[--report-path=<path>]
30-
[--threads=<number of threads>]
31-
[[--from-path-data=<path> --from-path-txn=<path>] | [--from-path=<path> [--temp-path=<path>]]]
14+
neo4j-admin database check [-h] [--expand-commands] [--force] [--verbose]
15+
[--check-counts[=true|false]] [--check-graph[=true|false]]
16+
[--check-indexes[=true|false]] [--check-property-owners[=true|false]]
17+
[--additional-config=<file>] [--max-off-heap-memory=<size>]
18+
[--report-path=<path>][--threads=<number of threads>]
19+
[[--from-path-data=<path> --from-path-txn=<path>] | [--from-path=<path> [--temp-path=<path>]]]
3220
<database>
3321
----
3422

35-
`<database>` -- Name of the database to check.
23+
=== Description
3624

37-
== Options
25+
This command allows for checking the consistency of a database, a dump, or a backup.
26+
It cannot be used with a database that is currently in use.
3827

39-
The `neo4j-admin database check` command has the following options:
28+
Some checks can be quite expensive, so it may be useful to turn some of them off for very large databases.
29+
Increasing the heap size might be a good idea.
30+
31+
[NOTE]
32+
====
33+
It is not recommended to use an NFS to check the consistency of a database, a dump, or a backup as this slows the process down significantly.
34+
====
4035

41-
[options="header",cols="1m,2a,3a"]
36+
=== Parameters
37+
38+
.`neo4j-admin database check` parameters
39+
[options="header", cols="1m,3a"]
4240
|===
43-
| Option
44-
| Possible values
41+
| Parameter
4542
| Description
4643

47-
| -h, --help
48-
|
49-
| Show this help message and exit.
44+
|<database>
45+
|Name of the database to check.
46+
|===
5047

51-
| --expand-commands
52-
|
53-
| Allow command expansion in config value evaluation.
48+
=== Options
5449

55-
| --force
56-
| `true` or `false` (Default: `false`)
57-
| Force a consistency check to be run, despite resources, and may run a more thorough check.
50+
The `neo4j-admin database check` command has the following options:
51+
52+
.`neo4j-admin database check` options
53+
[options="header", cols="5m,6a,4m"]
54+
|===
55+
| Option
56+
| Description
57+
| Default
5858

5959
| --verbose
60-
| `true` or `false` (Default: `false`)
6160
| Enable verbose output.
61+
|
62+
63+
|-h, --help
64+
|Show this help message and exit.
65+
|
6266

63-
| --check-graph
64-
| `true` or `false` (Default: `true`)
65-
| Perform checks between nodes, relationships, properties, types, and tokens.
67+
|--expand-commands
68+
|Allow command expansion in config value evaluation.
69+
|
6670

67-
| --check-counts
68-
| `true` or `false`
69-
| Perform consistency checks on the counts. Requires the `check-graph` option to be `true` (which is by default) and will implicitly enable `<check-graph>` if it is not explicitly disabled. Default: `<check-graph>`.
71+
|--additional-config=<file>
72+
| Configuration file with additional configuration.
73+
|
7074

71-
| --check-indexes
72-
| `true` or `false` (Default: `true`)
73-
| Perform checks on indexes.
75+
|--force
76+
| `Force a consistency check to be run, despite resources, and may run a more thorough check.
77+
|
7478

75-
| --check-property-owners
76-
| `true` or `false` (Default: `false`)
77-
| Perform consistency checks on the ownership of properties. Requires the `check-graph` option to be `true` (which is by default) and will implicitly enable `<check-graph>` if it is not explicitly disabled.
79+
|--check-indexes[=true\|false]
80+
|Perform consistency checks on indexes.
81+
|true
7882

79-
| --additional-config
80-
| `<file>`
81-
| Path to a configuration file that contains additional configuration options.
83+
|--check-graph[=true\|false]
84+
|Perform consistency checks between nodes, relationships, properties, types, and tokens.
85+
|true
8286

83-
| --max-off-heap-memory
84-
| `<size>` (Default: `90%`)
85-
| Maximum memory that `neo4j-admin`` can use for page cache and various caching data structures to improve performance.
86-
Value can be plain numbers, like `10000000` or e.g. `20G` for 20 gigabytes, or even e.g. `70%`, which will amount to 70% of currently free memory on the machine.
87+
|--check-counts[=true\|false]
88+
| Perform consistency checks on the counts. Requires <check-graph>, and may implicitly enable <check-graph> if it were not explicitly disabled.
89+
|<check-graph>
8790

88-
| --report-path
89-
| `<path>` (Default: `.`)
90-
| Path to where a consistency report will be written. Interpreted as a directory, unless it has an extension of _.report_.
91+
| --check-property-owners[=true\|false]
92+
| Perform consistency checks on the ownership of properties. Requires <check-graph>, and may implicitly enable <check-graph> if it were not explicitly disabled.
93+
|false
9194

92-
| --threads
93-
| `<number of threads>` (Default: the number of CPUs on the machine)
94-
| Number of threads used to check the consistency.
95+
| --report-path=<path>
96+
| Path to where a consistency report will be written. Interpreted as a directory, unless it has an extension of `.report`.
97+
| .
9598

96-
| --from-path-data
97-
| `<path>` (Default: xref:reference/configuration-settings.adoc#config_server.directories.data, [`server.directories.data`]/databases)
98-
| Path to the databases directory, containing the database directory to source from.
99+
|--max-off-heap-memory=<size>
100+
| Maximum memory that `neo4j-admin` can use for page cache and various caching data structures to improve performance.
101+
Value can be plain numbers, like `10000000` or e.g. `20G` for 20 gigabytes, or even e.g. `70%`, which will amount to 70% of currently free memory on the machine.
102+
|90%
99103

100-
| --from-path-txn
101-
| `<path>` (Default: xref:reference/configuration-settings.adoc#config_server.directories.transaction.logs.root[`server.directories.transaction.logs.root`])
102-
| Path to the transactions_ directory, containing the transaction directory for the database to source from.
104+
|--threads=<number of threads>
105+
|Number of threads used to check the consistency.
106+
|The number of CPUs on the machine.
103107

104-
| --from-path
105-
| `<path>`
106-
| Path to the directory containing dump/backup artifacts whose consistency will be checked.
108+
|--from-path-data=<path>
109+
|Path to the databases directory, containing the database directory to source from.
110+
| xref:reference/configuration-settings.adoc#config_server.directories.data, [`server.directories.data`]/databases
107111

108-
| --temp-path
109-
| `<path>`
110-
| Path to a directory to be used as a staging area to extract dump/backup artifacts if needed.
112+
|--from-path-txn=<path>
113+
|Path to the transactions directory, containing the transaction directory for the database to source from.
114+
| xref:reference/configuration-settings.adoc#config_server.directories.transaction.logs.root[`server.directories.transaction.logs.root`]
111115

112-
| <database>
116+
|--from-path=<path>
117+
|Path to a directory containing dump/backup artifacts to check the consistency of.
113118
|
114-
| Name of the database to check.
119+
120+
|--temp-path=<path>
121+
|Path to a directory to be used as a staging area to extract dump/backup artifacts, if needed.
122+
|<from-path>
115123
|===
116124

117125
== Output

0 commit comments

Comments
 (0)