Skip to content

Commit 67f2e51

Browse files
Deprecate dbms.cluster.recreateDatabase (#2210)
In 2025.04 we deprecate `dbms.cluster.recreateDatabase` in favour of `dbms.recreateDatabase`. --------- Co-authored-by: NataliaIvakina <[email protected]>
1 parent 77e41b2 commit 67f2e51

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

modules/ROOT/pages/changes-deprecations-removals.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,13 @@ For deprecations in Cypher language, see link:https://neo4j.com/docs/cypher-manu
386386
| Enterprise Edition
387387
| Comment
388388
389+
| xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`]
390+
|
391+
| {check-mark}
392+
| label:deprecated[Deprecated in 2025.04] +
393+
Replaced by xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`]
394+
395+
389396
| xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase()`] label:admin-only[]
390397
|
391398
| {check-mark}

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ neo4j@neo4j> DRYRUN REALLOCATE DATABASES;
249249
[[recreate-databases]]
250250
== Recreate a database
251251

252-
The xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`] procedure allows you to:
252+
In Neo4j 2025.04, the xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`] procedure is deprecated in favour of xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`].
253+
254+
The recreate procedure allows you to:
253255

254256
* Change the database store to a specified backup, while keeping all the associated privileges for the database.
255257

@@ -304,7 +306,7 @@ See xref::database-administration/standard-databases/seed-from-uri.adoc[Seed fro
304306

305307
[source, shell]
306308
----
307-
CALL dbms.cluster.recreateDatabase("neo4j", {seedURI: "s3://myBucket/myBackup.backup"});
309+
CALL dbms.recreateDatabase("neo4j", {seedURI: "s3://myBucket/myBackup.backup"});
308310
----
309311

310312
[[seed-servers]]
@@ -328,7 +330,7 @@ The number of defined servers cannot exceed the number of total allocations in t
328330
+
329331
[source, shell]
330332
----
331-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: ["serverId1", "serverId2", "serverId3"]});
333+
CALL dbms.recreateDatabase("neo4j", {seedingServers: ["serverId1", "serverId2", "serverId3"]});
332334
----
333335

334336
[[undefined-servers]]
@@ -339,7 +341,7 @@ The store will be replaced by the most up-to-date seeder available in the cluste
339341
+
340342
[source, shell]
341343
----
342-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: []});
344+
CALL dbms.recreateDatabase("neo4j", {seedingServers: []});
343345
----
344346

345347
[[undefined-servers-backup]]
@@ -351,7 +353,7 @@ This means the store is replaced by the most up-to-date seeder if available; oth
351353
+
352354
[source, shell]
353355
----
354-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3://myBucket/myBackup.backup"});
356+
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3://myBucket/myBackup.backup"});
355357
----
356358

357359
[[alter-topology-recreate]]
@@ -365,7 +367,7 @@ If there are more available servers in the cluster hosting the database than the
365367

366368
[source, shell]
367369
----
368-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
370+
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
369371
----
370372

371373
[[cluster-seed]]

modules/ROOT/pages/import.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ Incremental import into an existing database.
661661
The importer works well on standalone servers.
662662
663663
In clustering environments with multiple copies of the database, the updated database must be used as a source to reseed the rest of the database copies.
664-
You can use the procedure xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`].
664+
You can use the procedure xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`].
665665
For details, see xref:clustering/databases.adoc#recreate-databases[Recreate databases].
666666
667667
Starting the clustered database after an incremental import without reseeding or performing the incremental import on a single server while the database remains online on other clustered members may result in unpredictable consequences, including data inconsistency between cluster members.

modules/ROOT/pages/procedures.adoc

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ CALL dbms.cluster.readReplicaToggle("neo4j", false)
540540
|===
541541

542542

543-
[role=label--enterprise-edition]
543+
[role=label--deprecated-2025.04 label--enterprise-edition]
544544
[[procedure_dbms_cluster_recreateDatabase]]
545545
=== dbms.cluster.recreateDatabase()
546546

@@ -698,6 +698,31 @@ Running the procedure with an admin privilege is deprecated.
698698
Running the procedure with an admin privilege is deprecated.
699699
====
700700

701+
702+
[role=label--enterprise-edition label--new-2025.04]
703+
[[procedure_dbms_recreateDatabase]]
704+
=== dbms.recreateDatabase()
705+
706+
707+
.Details
708+
|===
709+
| *Syntax* 3+m| dbms.recreateDatabase(database :: STRING, options = {} :: MAP)
710+
| *Description* 3+a| Recreates a database while keeping all RBAC settings.
711+
The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster.
712+
.3+| *Input arguments* | *Name* | *Type* | *Description*
713+
| `database` | `STRING` | The name of the database to recreate.
714+
| `options` | `MAP` | The seeding and topology options to use for recreating the database.
715+
| *Mode* 3+| WRITE
716+
|===
717+
718+
[NOTE]
719+
====
720+
It is mandatory to specify either `seedURI` or `seedingServers` as seeding options in the `options` field.
721+
Further details on how to use the `dbms.recreateDatabase()` procedure are provided in the related section inside the xref:clustering/databases.adoc#recreate-databases[Managing databases in a cluster] page.
722+
If no topology option is defined, the database will be recreated with the previous topology.
723+
====
724+
725+
701726
[role=label--admin-only label--enterprise-edition]
702727
[[procedure_dbms_setDefaultAllocationNumbers]]
703728
=== dbms.setDefaultAllocationNumbers()

0 commit comments

Comments
 (0)