Skip to content

Commit a3be134

Browse files
Update databases.adoc
1 parent b3c962e commit a3be134

File tree

1 file changed

+36
-22
lines changed

1 file changed

+36
-22
lines changed

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,47 +227,55 @@ neo4j@neo4j> DRYRUN REALLOCATE DATABASES;
227227

228228
[role=label--new-5.24]
229229
[[recreate-databases]]
230-
== Recreate databases
230+
== Recreate a database
231231

232-
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:
233233

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.
235235

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).
237237
// See xref:clustering/disaster-recovery.adoc[] for more information.
238238

239239
[CAUTION]
240240
====
241241
The recreate procedure works only for real user databases and not for composite databases, or the `system` database.
242242
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.
244244
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.
248245
====
249246

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.
251248

252249
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.
254251

255252
Before recreating a database, any eventual quarantined states need to be addressed.
256253
For more information, see xref:database-administration/standard-databases/errors.adoc#quarantine[Standard databases -> Error handling].
257254

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.
262256

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.
265258

266259
Additionally, you have the option to modify <<alter-topology-recreate, the topology>> during the recreation process.
267260
However, note that the store format, access, and enrichment cannot be altered during recreation.
268261

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+
269277
[[uri-seed]]
270-
==== `seedURI`
278+
==== Use backup as a seed
271279

272280
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.
273281
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
277285

278286
[source, shell]
279287
----
280-
CALL dbms.cluster.recreateDatabase("neo4j", {seedURI: "myBackup"});
288+
CALL dbms.cluster.recreateDatabase("neo4j", {seedURI: "s3:/myBucket/myBackup.backup"});
281289
----
282290

283291
[[seed-servers]]
284-
==== `seedingServers`
292+
==== Use available allocations as seed
293+
294+
The database recreation process is designed to select the latest seed from the seeding servers.
295+
Specifying only a subset of the previous cluster servers as seeders carries a risk of data loss.
296+
297+
[[specified-servers]]
298+
===== Specified servers
285299

286-
Specify a set of available servers.
300+
You can specify a set of available servers.
287301
The stores on all allocations will be synchronized to the most up-to-date store from the defined servers.
288302
The number of defined servers cannot exceed the number of total allocations in the desired topology.
289303

@@ -293,7 +307,7 @@ CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: ["serverId1", "serv
293307
----
294308

295309
[[undefined-servers]]
296-
==== Undefined servers
310+
===== Undefined servers
297311

298312
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.
299313
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
312326

313327
[source, shell]
314328
----
315-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], seedURI: "myBackup"});
329+
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3:/myBucket/myBackup.backup"});
316330
----
317331

318332
[[alter-topology-recreate]]

0 commit comments

Comments
 (0)