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:
233
+
234
+
* To change the database store to a specified backup, while keeping all the associated privileges for the database.
235
+
236
+
* To make your database write-available again after it has been lost (for example, due to a disaster).
237
+
// See xref:clustering/disaster-recovery.adoc[] for more information.
238
+
239
+
[CAUTION]
240
+
====
241
+
The recreate procedure works only for real user databases and not for composite databases, or the `system` database.
242
+
243
+
Remember that the recreate procedure results in downtime while the stores get updated.
244
+
The time is unbounded and may depend on different factors -- for example, the size of the store, network speed, etc.
245
+
====
246
+
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.
248
+
249
+
If your database has Change Data Capture (CDC) enabled, the CDC chain will stop when the database is recreated, even though CDC remains enabled in the recreated database.
250
+
To restore CDC functionality, follow the guide on how link:https://neo4j.com/docs/cdc/current/existing-databases/[to initialize CDC applications from an existing database].
251
+
252
+
Before recreating a database, any eventual quarantined states need to be addressed.
253
+
For more information, see xref:database-administration/standard-databases/errors.adoc#quarantine[Standard databases -> Error handling].
254
+
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.
256
+
257
+
To check if the recreation is successful, use the `SHOW DATABASES` command and verify that all allocations have been started.
258
+
259
+
Additionally, you have the option to modify <<alter-topology-recreate, the topology>> during the recreation process.
260
+
However, note that the store format, access, and enrichment cannot be altered during recreation.
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
+
See <<undefined-servers-backup, Undefined servers with fallback backup>> for more details.
274
+
275
+
* If `seedingServers` is not empty and `seedURI` is also defined, an error will occur.
276
+
277
+
[[uri-seed]]
278
+
==== Use backup as a seed
279
+
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.
281
+
The new allocations can be put on any `ENABLED` server in the cluster.
282
+
See <<cluster-seed-uri, Seed from URI>> for more details.
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.
318
+
The store will be replaced by the most up-to-date seeder available in the cluster.
There is an option to define a new topology when recreating a database.
341
+
This can be beneficial during a disaster, if enough servers are not available to recreate the database with the original topology.
342
+
When altering the total number of allocations down during a recreation, it is important to remember that the number of seeding servers cannot exceed the number of total allocations of the database.
343
+
This also holds true when using recreate with an empty list of seeders.
344
+
If there are more available servers in the cluster hosting the database than the number of new allocations, the recreation will fail.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clustering/index.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This chapter describes the following:
9
9
* Setting up a cluster -- The basics of configuring and deploying a new cluster.
10
10
** xref:clustering/setup/deploy.adoc[Deploy a basic cluster] -- How to set up a basic cluster.
11
11
** xref:clustering/setup/analytics-cluster.adoc[Deploy an analytics cluster] -- How to deploy a special case Neo4j cluster for analytic queries.
12
-
** xref:clustering/setup/single-to-cluster.adoc[Move from single server to cluster] -- This section describes how to move from a single Neo4j server to Neo4j cluster.
12
+
** xref:clustering/setup/single-to-cluster.adoc[Move from a standalone deployment to a cluster] -- This section describes how to move from a single Neo4j server to Neo4j cluster.
13
13
** xref:clustering/setup/discovery.adoc[Cluster server discovery] -- How servers in a cluster discover each other and form a cluster.
14
14
** xref:clustering/setup/routing.adoc[Leadership, routing and load balancing] -- Election of leaders, routing and load balancing.
15
15
** xref:clustering/setup/encryption.adoc[Intra-cluster encryption] -- How to secure the cluster communication.
0 commit comments