Skip to content

Commit 85ebba9

Browse files
Clarify Neo4j versions
1 parent 2bcd614 commit 85ebba9

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ The recreate procedure allows you to:
258258
* Make your database write-available again after it has been lost (for example, due to a disaster).
259259
See xref:clustering/disaster-recovery.adoc[Disaster recovery] for more information.
260260

261-
* Delete the data and schema for a database, while keeping all the associated privileges (from Neo4j 2025.04).
261+
* label:new[Introduced in 2025.02] Delete the data and schema for a database, while keeping the database privileges assigned to each role.
262+
263+
* label:new[Introduced in 2025.04] Alter the database store format when clearing the data and schema via the new procedure `dbms.recreateDatabase()`.
262264

263265
[CAUTION]
264266
====
@@ -359,44 +361,53 @@ This means the store is replaced by the most up-to-date seeder if available; oth
359361
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3://myBucket/myBackup.backup"});
360362
----
361363

362-
[[clear-data-recreate]]
363-
=== Clear data option
364-
365-
In Neo4j 2025.02, an additional option is added to the recreate procedure.
366-
The new option `clearData` deletes the data (e.g., nodes and relationships) and the schema (e.g., constraints and indexes) for the database.
367-
This means you end up with an empty store, but as with the other recreate database options, all privileges associated with the database are kept.
368364

369-
When, and only when, the clear data option is used, the store format can also be changed for the recreated database.
370-
See xref:database-internals/store-formats.adoc[Store formats], for more details about available database store formats in Neo4j.
371-
If the store format option is not defined, the recreated database ends up with the same store format as before the recreation.
365+
[[alter-topology-recreate]]
366+
=== Change the topology
372367

368+
There is an option to define a new topology when recreating a database.
369+
This can be beneficial during a disaster, if enough servers are not available to recreate the database with the original topology.
370+
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.
371+
This also holds true when using recreate with an empty list of seeders.
372+
If there are more available servers in the cluster hosting the database than the number of new allocations, the recreation will fail.
373373

374374
[source, shell]
375375
----
376-
CALL dbms.recreateDatabase("neo4j", {clearData: true, storeFormat: "block"});
376+
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
377377
----
378378

379+
380+
[role=label--new-2025.02]
381+
[[clear-data-recreate]]
382+
=== Clear data option
383+
384+
In Neo4j 2025.02, the `clearData` option was added to the recreate procedure.
385+
This option allows you to delete the data (e.g., nodes and relationships) and the schema (e.g., constraints and indexes) for the database.
386+
This means you end up with an empty store, but as with the other recreate database options, all privileges associated with the database are kept.
387+
379388
[CAUTION]
380389
====
381390
Using the clear data option means the data and schema will be deleted *permanently*.
382391
If you want to have the option of getting them back later, make sure to take a backup before clearing the database.
383392
See xref:backup-restore/online-backup.adoc[Online backup] for more information.
384393
====
385394

386-
[[alter-topology-recreate]]
387-
=== Change the topology
395+
[role=label--new-2025.04]
396+
[[alter-store-format]]
397+
==== Alter the database store format
388398

389-
There is an option to define a new topology when recreating a database.
390-
This can be beneficial during a disaster, if enough servers are not available to recreate the database with the original topology.
391-
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.
392-
This also holds true when using recreate with an empty list of seeders.
393-
If there are more available servers in the cluster hosting the database than the number of new allocations, the recreation will fail.
399+
In Neo4j 2025.04, the database store format can also be altered during recreation, but only when the `clearData` option is specified.
400+
This functionality is available through the new `dbms.recreateDatabase()` procedure.
401+
402+
See xref:database-internals/store-formats.adoc[Store formats], for more details about available database store formats in Neo4j.
403+
If the store format option is not defined, the recreated database ends up with the same store format as before the recreation.
394404

395405
[source, shell]
396406
----
397-
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
407+
CALL dbms.recreateDatabase("neo4j", {clearData: true, storeFormat: "block"});
398408
----
399409

410+
400411
[[cluster-seed]]
401412
== Seed a cluster
402413

0 commit comments

Comments
 (0)