Skip to content

Commit 24d52ce

Browse files
authored
Update neo4j-admin database dump syntax and options to reflect the code (#707)
Cherry-picked from #704
1 parent f0e49f1 commit 24d52ce

File tree

1 file changed

+53
-23
lines changed

1 file changed

+53
-23
lines changed

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

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,45 +32,73 @@ It does not support SSL/TLS.
3232

3333
[source,role=noheader]
3434
----
35-
neo4j-admin database dump [--verbose]
36-
[--expand-commands]
37-
[--overwrite-destination[=true|false]]
38-
[--to-path=<path> | --to-stdout]
39-
<database>
35+
neo4j-admin database dump [-h] [--expand-commands]
36+
[--verbose] [--overwrite-destination[=true|false]]
37+
[--additional-config=<file>]
38+
[--to-path=<path> | --to-stdout]
39+
<database>
4040
----
4141

42-
<database> -- Name of the database to dump.
43-
Can contain `*` and `?` for globbing.
42+
=== Description
43+
44+
Dump a database into a single-file archive.
45+
The archive can be used by the load command.
46+
`<to-path>` should be a directory (in which case a file called _<database>.dump_ will be created), or `--to-stdout` can be supplied to use standard output.
47+
If neither `--to-path` or `--to-stdout` is supplied `server.directories.dumps.root` setting will be used as a destination.
48+
It is not possible to dump a database that is mounted in a running Neo4j server.
49+
50+
=== Parameters
51+
52+
.`neo4j-admin database dump` parameters
53+
[options="header", cols="1m,3a"]
54+
|===
55+
| Parameter
56+
| Description
57+
58+
|<database>
59+
|Name of the database to dump. Can contain `\*` and `?` for globbing.
60+
Note that `*` and `?` have special meaning in some shells and might need to be escaped or used with quotes.
61+
|===
4462

4563
[[offline-backup-command-options]]
4664
=== Options
4765

48-
[options="header",cols="m,m,a"]
66+
The `neo4j-admin database dump` command has the following options:
67+
68+
.`neo4j-admin database dump` options
69+
[options="header", cols="5m,6a,4m"]
4970
|===
5071
| Option
51-
| Default
5272
| Description
73+
| Default
74+
75+
|--additional-config=<file>
76+
|Configuration file with additional configuration.
77+
|
5378

54-
| --verbose
79+
|--expand-commands
80+
|Allow command expansion in config value evaluation.
5581
|
56-
| Enable verbose output.
5782

58-
| --expand-commands
83+
| -h, --help
84+
|Show this help message and exit.
5985
|
60-
| Allow command expansion in config value evaluation.
6186

62-
| --overwrite-destination
63-
| false
64-
| Overwrite any existing dump file in the destination folder.
87+
| --overwrite-destination[=true\|false]
88+
|Overwrite any existing dump file in the destination folder.
89+
|false
6590

66-
| --to-path
91+
|--to-path=<path>
92+
|Destination folder of a database dump.
6793
|
68-
| Destination for the database dump.
69-
It must point to an existing directory.
7094

71-
| --to-stdout
95+
|--to-stdout
96+
|Use standard output as the destination for the database dump.
97+
|
98+
99+
|--verbose
100+
|Enable verbose output.
72101
|
73-
| Use standard output as the destination for the database dump.
74102
|===
75103

76104

@@ -80,11 +108,13 @@ It must point to an existing directory.
80108
The following is an example of how to create a dump of the default database `neo4j` using the `neo4j-admin database dump` command.
81109
The target directory _/dumps/neo4j_ must exist before running the command and the database must be offline.
82110

83-
[source,shell]
111+
[source, shell, role="nocopy"]
84112
----
85-
bin/neo4j-admin database dump neo4j --to-path=/dumps/neo4j
113+
bin/neo4j-admin database dump <database> --to-path=/full/path/to/dumps/<database>
86114
----
87115

116+
The command creates a file called _<database>.dump_ where `<database>` is the database specified in the command.
117+
88118
[NOTE]
89119
====
90120
`neo4j-admin database dump` cannot be applied to xref:composite-databases/index.adoc[Composite databases].

0 commit comments

Comments
 (0)