You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/backup-restore/planning.adoc
+38-29Lines changed: 38 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ If you have zero tolerance for downtime and data loss, you might want to conside
38
38
** use SSL/TLS for the backup network communication (online only).
39
39
** keep your databases as archive files (online or offline).
40
40
* How many backups you want to keep.
41
-
* Where the backups will be stored —drive or remote server, cloud storage, different data center, different location, etc.
41
+
* Where the backups will be stored —drive or remote server, cloud storage, different data center, different location, etc.
42
42
+
43
43
[TIP]
44
44
====
@@ -51,15 +51,14 @@ This ensures that if for some reason your Neo4j DBMS crashes, you will be able t
51
51
== Backup and restore options
52
52
53
53
Neo4j supports backing up and restoring both online and offline databases.
54
-
It uses xref:neo4j-admin-neo4j-cli.adoc[Neo4j Admin tool] commands, which can be run from a live, as well as from an offline Neo4j DBMS.
54
+
It uses xref:neo4j-admin-neo4j-cli.adoc[Neo4j Admin tool] commands that can be executed on a Neo4j DBMS, whether it is running or offline.
55
55
All `neo4j-admin` commands must be invoked as the `neo4j` user to ensure the appropriate file permissions.
56
56
57
-
* `neo4j-admin database backup/restore` (Enterprise only) -– used for performing online backup (xref:backup-restore/modes.adoc#full-backup[full] and xref:backup-restore/modes.adoc#differential-backup[differential]) and restore operations.
58
-
The database to be backed up must be in **online** mode.
59
-
The command produces an immutable artifact, which has an inspectable API to aid management and operability.
60
-
This command is suitable for production environments, where you cannot afford downtime.
61
-
+
62
-
The command can also be invoked over the network if access is enabled using `server.backup.listen_address`.
57
+
* `neo4j-admin database backup/restore` label:enterprise[Enterprise Edition] – used for performing online backup (xref:backup-restore/modes.adoc#full-backup[full] and xref:backup-restore/modes.adoc#differential-backup[differential]) and restore operations.
58
+
** The database to be backed up must be in **online** mode.
59
+
** The command produces an immutable artifact, which has an inspectable API to aid management and operability.
60
+
** This command is suitable for production environments, where you cannot afford downtime.
61
+
** The command can also be invoked over the network if access is enabled using `server.backup.listen_address`.
63
62
+
64
63
[NOTE]
65
64
====
@@ -73,9 +72,9 @@ For more information, refer to the xref:backup-restore/online-backup.adoc#backup
73
72
When using `neo4j-admin database backup` in a cluster, it is recommended to back up from an external instance as opposed to reuse instances that form part of the cluster.
74
73
====
75
74
* `neo4j-admin database dump/load` –- used for performing offline dump and load operations.
76
-
The database to be dumped must be in **offline** mode.
77
-
The dump command can only be invoked from the server command line and is suitable for environments where downtime is not a factor.
78
-
The command produces an archive file that follows the format _<databasename><timestamp>.dump_.
75
+
** The database to be dumped must be in **offline** mode.
76
+
** The dump command can only be invoked from the server command line and is suitable for environments where downtime is not a factor.
77
+
** The command produces an archive file that follows the format _<databasename><timestamp>.dump_.
79
78
* `neo4j-admin database copy` –- used for copying an offline database or backup.
80
79
This command can be used for cleaning up database inconsistencies and reclaiming unused space.
81
80
@@ -84,23 +83,9 @@ This command can be used for cleaning up database inconsistencies and reclaiming
84
83
File system copy-and-paste of databases is not supported and may result in unwanted behavior, such as corrupt stores.
85
84
====
86
85
87
-
=== Considerations for backing up and restoring databases in a cluster
88
-
89
-
Backing up a database in a clustered environment is not essentially different from a standalone backup, apart from the fact that you must know which server in a cluster to connect to.
90
-
Use `SHOW DATABASE <database>` to learn which servers are hosting the database you want to back up.
91
-
See xref:clustering/monitoring/show-databases-monitoring.adoc#show-databases-monitoring-listing-single[Listing a single database] for more information.
92
-
93
-
However, _restoring_ a database in a cluster is different since it is not known in advance how a database is going to be allocated to the servers in a cluster.
94
-
This method relies on the seed already existing on one of the servers.
95
-
The recommended way to restore a database in a cluster is to xref::database-administration/standard-databases/seed-from-uri.adoc[seed from URI].
96
-
97
-
[NOTE]
98
-
====
99
-
The Neo4j Admin commands `backup`, `restore`, `dump`, `load`, `copy`, and `check-consistency` are not supported for use on xref:database-administration/composite-databases/concepts.adoc[Composite databases].
100
-
They must be run directly on the databases that are associated with that Composite database.
101
-
====
86
+
The following table summarizes the commands' capabilities and usage.
102
87
103
-
.The following table describes the commands' capabilities and usage.
88
+
.`neo4j-admin` commands for backing up and restoring databases
104
89
[cols="<,^,^,^",frame="topbot",options="header"]
105
90
|===
106
91
| Capability/ Usage
@@ -184,19 +169,43 @@ They must be run directly on the databases that are associated with that Composi
184
169
| {check-mark}
185
170
|===
186
171
172
+
173
+
[NOTE]
174
+
====
175
+
The Neo4j Admin commands `backup`, `restore`, `dump`, `load`, `copy`, and `check-consistency` are not supported for use on xref:database-administration/composite-databases/concepts.adoc[Composite databases].
176
+
They must be run directly on the databases that are associated with that Composite database.
177
+
====
178
+
179
+
180
+
=== Considerations for backing up and restoring databases in a cluster
181
+
182
+
Backing up a database in a clustered environment is not essentially different from a standalone backup, apart from the fact that you must know which server in a cluster to connect to.
183
+
Use `SHOW DATABASE <database>` to learn which servers are hosting the database you want to back up.
184
+
See xref:clustering/monitoring/show-databases-monitoring.adoc#show-databases-monitoring-listing-single[Listing a single database] for more information.
185
+
186
+
However, _restoring_ a database in a cluster is different since it is not known in advance how a database is going to be allocated to the servers in a cluster.
187
+
This method relies on the seed already existing on one of the servers.
188
+
The recommended way to restore a database in a cluster is to xref::database-administration/standard-databases/seed-from-uri.adoc[seed from URI].
189
+
190
+
187
191
[[backup-planning-databases]]
188
192
== Databases to backup
189
193
190
194
A Neo4j DBMS can host multiple databases.
191
195
Both Neo4j Community and Enterprise Editions have a default user database, called `neo4j`, and a `system` database, which contains configurations, e.g., operational states of databases, security configuration, schema definitions, login credentials, and roles.
192
-
In the Enterprise Edition, you can also create additional user databases.
196
+
197
+
In the Enterprise Edition, you can also create multiple user databases.
193
198
Each of these databases is backed up independently of one another.
194
199
195
200
[NOTE]
196
201
====
197
-
It is very important to store a recent backup of your databases, including the `system` database, in a safe location.
202
+
Backing up the `system` database, it is recommended to use the `--include-metadata=all` option.
203
+
This restores the user databases to the new `system` database retaining not only `users` and `roles` but also the cluster topology.
198
204
====
199
205
206
+
It is very important to store a recent backup of your databases, including the `system` database, in a safe location.
0 commit comments