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
Neo4j 5.24 introduces the xref:reference/procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`] procedure, which allows you to restore a database:
232
+
Neo4j 5.24 introduces the xref:reference/procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`] procedure, which allows you:
233
233
234
-
* to a specified backup, while keeping all the associated privileges for the database.
234
+
* To change the database store to a specified backup, while keeping all the associated privileges for the database.
235
235
236
-
* to a write mode again after it has been lost (for example, due to a disaster).
236
+
* To make your database write-available again after it has been lost (for example, due to a disaster).
237
237
// See xref:clustering/disaster-recovery.adoc[] for more information.
238
238
239
239
[CAUTION]
240
240
====
241
241
The recreate procedure works only for real user databases and not for composite databases, or the `system` database.
242
242
243
-
Keep in mind the recreate procedure results in downtime while the stores get updated.
243
+
Remember that the recreate procedure results in downtime while the stores get updated.
244
244
The time is unbounded and may depend on different factors -- for example, the size of the store, network speed, etc.
245
-
246
-
The database recreation process is designed to select the latest seed from the defined seeding servers.
247
-
Specifying only a subset of the previous cluster servers as seeders carries a risk of data loss.
248
245
====
249
246
250
-
The database in question can be in an `online` or `offline` state when it is recreated, but a successful operation starts the database regardless of the previous state.
247
+
The database in question can be in an `online` or `offline` state when it is recreated, but a successful operation starts the database regardless of its previous state.
251
248
252
249
If CDC is enabled for the database, it will still be enabled after recreating the database, however the chain will be broken.
253
-
See link:https://neo4j.com/docs/cdc/current/[CDC documentation] for more details.
250
+
See link:https://neo4j.com/docs/cdc/current/backup-restore/[CDC documentation -> Restore backups and snapshots] for more details.
254
251
255
252
Before recreating a database, any eventual quarantined states need to be addressed.
256
253
For more information, see xref:database-administration/standard-databases/errors.adoc#quarantine[Standard databases -> Error handling].
257
254
258
-
You need xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-database-management[the `CREATE DATABASE` and `DROP DATABASE` privileges] to run the recreate procedure.
259
-
260
-
[[recreate-seeding-options]]
261
-
=== Seeding options and configurations
255
+
You need xref:authentication-authorization/dbms-administration.adoc#access-control-dbms-administration-database-management[the `CREATE DATABASE` and `DROP DATABASE` privileges] to run the recreate procedure.
262
256
263
-
The store to be used during the recreation of a database can be defined in three different ways.
264
-
One method uses a backup, while the two others use available allocations in the cluster.
257
+
To check if the recreation is successful, use the `SHOW DATABASES` command and verify that all allocations have been started.
265
258
266
259
Additionally, you have the option to modify <<alter-topology-recreate, the topology>> during the recreation process.
267
260
However, note that the store format, access, and enrichment cannot be altered during recreation.
268
261
262
+
[[recreate-seeding-options]]
263
+
=== Seeding options
264
+
265
+
The store to be used during the recreation of a database can be defined in different ways.
266
+
One method uses a backup, while others use available allocations in the cluster.
267
+
268
+
You can use either <<uri-seed, `seedURI`>> or <<seed-servers, `seedingServers`>> to specify the source from which the database should be recreated.
269
+
270
+
* If you define neither, an error is thrown.
271
+
272
+
* If you define both of them, then `seedingServers` must be an empty list.
273
+
274
+
* If `seedingServers` is not empty and `seedURI` is also defined, an error will occur.
275
+
See <<undefined-servers-backup, Undefined servers with fallback backup>> for more details.
276
+
269
277
[[uri-seed]]
270
-
==== `seedURI`
278
+
==== Use backup as a seed
271
279
272
280
If you provide a URI to a backup or a dump, the stores on all allocations will be replaced by the backup or the dump at the given URI.
273
281
The new allocations can be put on any `ENABLED` server in the cluster.
@@ -277,13 +285,19 @@ To avoid possible data loss, ensure you back up the current store before replaci
If you provide an empty list of seeding servers and do not specify a `seedURI`, Neo4j automatically selects all available allocations of the database as seeders.
299
313
The store will be replaced by the most up-to-date seeder available in the cluster.
@@ -312,7 +326,7 @@ This means the store is replaced by the most up-to-date seeder if available; oth
0 commit comments