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
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/standard-databases/recreate-database.adoc
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,30 @@
1
1
:description: How to recreate your database in Neo4j.
2
2
[role=enterprise-edition]
3
3
4
-
5
4
= Recreate a database
6
5
7
6
== The recreate procedure
8
7
9
-
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()`].
8
+
The recreate procedure allows you to:
9
+
10
+
* Change the database store to a specified backup, while keeping all the associated privileges for the database.
11
+
12
+
* Make your database write-available again after it has been lost (for example, due to a disaster).
13
+
See xref:clustering/disaster-recovery.adoc[Disaster recovery] for more information.
14
+
15
+
* label:new[Introduced in 2025.02] Delete the data and schema for a database, while keeping the database privileges assigned to each role.
16
+
17
+
* label:new[Introduced in 2025.04] Alter the database store format when clearing the data and schema.
18
+
19
+
[CAUTION]
20
+
====
21
+
The recreate procedure works only for real user databases and not for composite databases, or the `system` database.
22
+
23
+
Remember that the recreate procedure results in downtime while the stores get updated.
24
+
The time is unbounded and may depend on different factors -- for example, the size of the store, network speed, etc.
25
+
====
26
+
27
+
In Neo4j 2025.04, the xref:procedures.adoc#procedure_dbms_cluster_recreateDatabase[`dbms.cluster.recreateDatabase()`] procedure is deprecated in favor of xref:procedures.adoc#procedure_dbms_recreateDatabase[`dbms.recreateDatabase()`].
10
28
11
29
=== Syntax
12
30
@@ -48,24 +66,7 @@ You cannot set secondaries without primaries.
48
66
49
67
|===
50
68
51
-
The recreate procedure allows you to:
52
-
53
-
* Change the database store to a specified backup, while keeping all the associated privileges for the database.
54
-
55
-
* Make your database write-available again after it has been lost (for example, due to a disaster).
56
-
See xref:clustering/disaster-recovery.adoc[Disaster recovery] for more information.
57
-
58
-
* label:new[Introduced in 2025.02] Delete the data and schema for a database, while keeping the database privileges assigned to each role.
59
-
60
-
* label:new[Introduced in 2025.04] Alter the database store format when clearing the data and schema.
61
-
62
-
[CAUTION]
63
-
====
64
-
The recreate procedure works only for real user databases and not for composite databases, or the `system` database.
65
-
66
-
Remember that the recreate procedure results in downtime while the stores get updated.
67
-
The time is unbounded and may depend on different factors -- for example, the size of the store, network speed, etc.
68
-
====
69
+
=== Considerations
69
70
70
71
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.
71
72
@@ -77,12 +78,13 @@ For more information, see xref:database-administration/standard-databases/errors
77
78
78
79
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.
79
80
80
-
To check if the recreation is successful, use the `SHOW DATABASES` command and verify that all allocations have been started.
81
-
82
81
Additionally, you have the option to modify <<alter-topology-recreate, the topology>> during the recreation process.
83
-
However, note that up to Neo4j 2025.04, the store format, access, and enrichment cannot be altered during recreation.
82
+
83
+
However, note that the store format (up to Neo4j 2025.04), access, and enrichment cannot be altered during recreation.
84
84
Starting with 2025.04, the store format can only be altered if the `clearData` option is used.
85
85
86
+
To check if the recreation is successful, use the `SHOW DATABASES` command and verify that all allocations have been started.
0 commit comments