Skip to content

Commit 2769da6

Browse files
committed
Deprecate dbms.cluster.recreateDatabase
1 parent 81f3635 commit 2769da6

File tree

4 files changed

+41
-9
lines changed

4 files changed

+41
-9
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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ 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+
The xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`] procedure allows you to:
253253

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

@@ -304,7 +304,7 @@ See <<cluster-seed-uri, Seed from URI>> for more details.
304304

305305
[source, shell]
306306
----
307-
CALL dbms.cluster.recreateDatabase("neo4j", {seedURI: "s3://myBucket/myBackup.backup"});
307+
CALL dbms.recreateDatabase("neo4j", {seedURI: "s3://myBucket/myBackup.backup"});
308308
----
309309

310310
[[seed-servers]]
@@ -328,7 +328,7 @@ The number of defined servers cannot exceed the number of total allocations in t
328328
+
329329
[source, shell]
330330
----
331-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: ["serverId1", "serverId2", "serverId3"]});
331+
CALL dbms.recreateDatabase("neo4j", {seedingServers: ["serverId1", "serverId2", "serverId3"]});
332332
----
333333

334334
[[undefined-servers]]
@@ -339,7 +339,7 @@ The store will be replaced by the most up-to-date seeder available in the cluste
339339
+
340340
[source, shell]
341341
----
342-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: []});
342+
CALL dbms.recreateDatabase("neo4j", {seedingServers: []});
343343
----
344344

345345
[[undefined-servers-backup]]
@@ -351,7 +351,7 @@ This means the store is replaced by the most up-to-date seeder if available; oth
351351
+
352352
[source, shell]
353353
----
354-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3://myBucket/myBackup.backup"});
354+
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], seedURI: "s3://myBucket/myBackup.backup"});
355355
----
356356

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

366366
[source, shell]
367367
----
368-
CALL dbms.cluster.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
368+
CALL dbms.recreateDatabase("neo4j", {seedingServers: [], primaries: 3, secondaries: 0});
369369
----
370370

371371
[[cluster-seed]]

modules/ROOT/pages/procedures.adoc

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,15 +540,15 @@ 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

547547
.Details
548548
|===
549549
| *Syntax* 3+m| dbms.cluster.recreateDatabase(database :: STRING, options = {} :: MAP)
550550
| *Description* 3+a| Recreates a database while keeping all RBAC settings.
551-
The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster.
551+
The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster (deprecated in favor of dbms.recreateDatabase).
552552
.3+| *Input arguments* | *Name* | *Type* | *Description*
553553
| `database` | `STRING` | The name of the database to recreate.
554554
| `options` | `MAP` | The seeding and topology options to use for recreating the database.
@@ -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]
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()

modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ Incremental import into an existing database.
592592
The importer works well on standalone servers.
593593
594594
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.
595-
You can use the procedure xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`].
595+
You can use the procedure xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`].
596596
For details, see xref:clustering/databases.adoc#recreate-databases[Recreate databases].
597597
598598
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.

0 commit comments

Comments
 (0)