|
4 | 4 |
|
5 | 5 | You can use the `neo4j-admin database check` command to check the consistency of a database, a dump, or a backup. |
6 | 6 | 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 | | -==== |
13 | 7 |
|
14 | 8 | == Syntax |
15 | 9 |
|
16 | 10 | The `neo4j-admin database check` command has the following syntax: |
17 | 11 |
|
| 12 | +[source,role=noheader] |
18 | 13 | ---- |
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>]]] |
32 | 20 | <database> |
33 | 21 | ---- |
34 | 22 |
|
35 | | -`<database>` -- Name of the database to check. |
| 23 | +=== Description |
36 | 24 |
|
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. |
38 | 27 |
|
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 | +==== |
40 | 35 |
|
41 | | -[options="header",cols="1m,2a,3a"] |
| 36 | +=== Parameters |
| 37 | + |
| 38 | +.`neo4j-admin database check` parameters |
| 39 | +[options="header", cols="1m,3a"] |
42 | 40 | |=== |
43 | | -| Option |
44 | | -| Possible values |
| 41 | +| Parameter |
45 | 42 | | Description |
46 | 43 |
|
47 | | -| -h, --help |
48 | | -| |
49 | | -| Show this help message and exit. |
| 44 | +|<database> |
| 45 | +|Name of the database to check. |
| 46 | +|=== |
50 | 47 |
|
51 | | -| --expand-commands |
52 | | -| |
53 | | -| Allow command expansion in config value evaluation. |
| 48 | +=== Options |
54 | 49 |
|
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 |
58 | 58 |
|
59 | 59 | | --verbose |
60 | | -| `true` or `false` (Default: `false`) |
61 | 60 | | Enable verbose output. |
| 61 | +| |
| 62 | + |
| 63 | +|-h, --help |
| 64 | +|Show this help message and exit. |
| 65 | +| |
62 | 66 |
|
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 | +| |
66 | 70 |
|
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 | +| |
70 | 74 |
|
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 | +| |
74 | 78 |
|
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 |
78 | 82 |
|
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 |
82 | 86 |
|
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> |
87 | 90 |
|
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 |
91 | 94 |
|
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 | +| . |
95 | 98 |
|
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% |
99 | 103 |
|
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. |
103 | 107 |
|
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 |
107 | 111 |
|
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`] |
111 | 115 |
|
112 | | -| <database> |
| 116 | +|--from-path=<path> |
| 117 | +|Path to a directory containing dump/backup artifacts to check the consistency of. |
113 | 118 | | |
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> |
115 | 123 | |=== |
116 | 124 |
|
117 | 125 | == Output |
|
0 commit comments