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/clustering/clustering-advanced/unbind.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,11 @@ Therefore, it is strongly recommended to consult with Neo4j Support before using
12
12
13
13
Use the `unbind` command only when troubleshooting **a specific server** and remember there is no guarantee that the allocator will reassign the same databases to this server, potentially resulting in orphaned database stores.
14
14
15
-
The `unbind` command preserves all database stores on the server; and when the unbound server is restarted and enabled, it is seen as an entirely new server.
15
+
The `unbind` command preserves all database stores on the server; and when the unbound server is restarted, it is seen as an entirely new server.
16
+
Therefore, it will not host any of the databases it hosted before the operation.
17
+
18
+
In 2025.x, the `unbind` command cannot be used to convert a cluster member into a standalone server.
19
+
Instead, it is recommended to take backups, create the standalone server, and then use those backups to restore the databases.
16
20
====
17
21
18
22
[[unbind-command-syntax]]
@@ -79,10 +83,6 @@ You can use the `neo4j-admin server unbind` command to remove the cluster state
79
83
To remove the cluster state of a server, run the `neo4j-admin server unbind` command from the _<NEO4J_HOME>_ folder of that server.
80
84
When restarted, an unbound server rejoins the cluster as a new server and has to be enabled using the `ENABLE SERVER` command.
81
85
82
-
=== Turn a cluster member into a standalone server
83
-
84
-
To start the Neo4j server in single (standalone) mode after unbinding it from the cluster, verify that xref:configuration/configuration-settings.adoc#config_initial.server.mode_constraint[`initial.server.mode_constraint`] is set to `NONE` in xref:configuration/neo4j-conf.adoc[The neo4j.conf file].
85
-
86
86
=== Archive cluster state
87
87
88
88
If something goes wrong and debugging is needed, you can archive the cluster state, from the _<NEO4J_HOME>_ folder, run the `neo4j-admin server unbind` command with the arguments `--archive-cluster-state=true` and `--archive-path=<destination-folder>`:
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clustering/servers.adoc
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -426,7 +426,7 @@ Likewise, if `ALTER SERVER '25a7efc7-d063-44b8-bdee-f23357f89f01' SET OPTIONS {a
426
426
427
427
The possible options when altering a server are:
428
428
429
-
[options="header", width="100%", cols="2a,2,^.^"]
429
+
[options="header", width="100%", cols="1a,2,2"]
430
430
|===
431
431
| Option
432
432
| Allowed values
@@ -435,7 +435,7 @@ The possible options when altering a server are:
435
435
| modeConstraint
436
436
| `PRIMARY`, `SECONDARY`, `NONE`
437
437
| Databases may only be hosted on the server in the mode specified by the constraint.
438
-
`None` means there is no constraint and any mode is allowed.
438
+
`NONE` means there is no constraint and any mode is allowed.
439
439
440
440
| allowedDatabases
441
441
| list of database names, e.g. `["db1", "db2"]`
@@ -459,10 +459,34 @@ This may not be specified in combination with `allowedDatabases`.
459
459
460
460
As with the `DEALLOCATE DATABASES FROM SERVER ...` command, if the alteration of a server's options renders it impossible for the cluster to satisfy one or more of the databases' topologies, then the command fails and no changes are made.
461
461
462
-
[NOTE]
462
+
[IMPORTANT]
463
463
====
464
464
Input provided to `SET OPTIONS {...}` replaces **all** existing options, rather than being combined with them.
465
-
For instance if `SET OPTIONS {modeConstraint:'SECONDARY'}` is executed followed by `SET OPTIONS {allowedDatabases:['foo']}`, the execution of the second `ALTER` removes the mode constraint.
465
+
466
+
Any previously set values must be specified every time you run the `ALTER SERVER` command; otherwise they will be overwritten to the unset values.
467
+
468
+
For instance, you run two statements one after the other:
469
+
470
+
[source,cypher]
471
+
----
472
+
ALTER SERVER '25a7efc7-d063-44b8-bdee-f23357f89f01' SET OPTIONS {modeConstraint:'SECONDARY'};
473
+
----
474
+
475
+
[source,cypher]
476
+
----
477
+
ALTER SERVER '25a7efc7-d063-44b8-bdee-f23357f89f01' SET OPTIONS {allowedDatabases:['foo']};
478
+
----
479
+
480
+
The execution of the second `ALTER SERVER` removes the mode constraint `SECONDARY`, replacing it with `NONE`.
481
+
482
+
If you want to keep both values `modeConstraint:'SECONDARY'` and `allowedDatabases:['foo']`, you have to explicitly set them in the options for the `ALTER SERVER` command:
483
+
484
+
[source,cypher]
485
+
----
486
+
ALTER SERVER '25a7efc7-d063-44b8-bdee-f23357f89f01' SET OPTIONS {modeConstraint:'SECONDARY', allowedDatabases:['foo']};
487
+
----
488
+
489
+
Always check the current configuration with `SHOW SERVERS YIELD *` and reapply unchanged options when using `ALTER SERVER`.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/configuration/neo4j-conf.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The _neo4j.conf_ file is the main source of configuration settings in Neo4j and
6
6
The location of the _neo4j.conf_ file in the different configurations of Neo4j is listed in xref:configuration/file-locations.adoc[Default file locations].
7
7
8
8
Most of the configuration settings in the _neo4j.conf_ file apply directly to Neo4j itself, but there are also other settings related to the Java Runtime (the JVM) on which Neo4j runs.
9
-
For more information, see the <<neo4j-conf-JVM, JVM specific configuration settings>>.
9
+
For more information, see the <<#neo4j-conf-JVM, JVM specific configuration settings>>.
10
10
Many of the configuration settings are also used by `neo4j` launcher scripts.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/aliases/manage-aliases-standard-databases.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,10 +316,10 @@ SHOW ALIAS `northwind` FOR DATABASE
316
316
317
317
The `CREATE ALIAS` command is optionally idempotent, with the default behavior to fail with an error if the database alias already exists.
318
318
To work around this, you can append `IF EXISTS` or `OR REPLACE` to the command.
319
-
Both check for any remote or local database aliases.
319
+
Both check for any remote or local database aliases with the given name, `IF NOT EXISTS` also check for existing databases with the given name.
320
320
321
321
* Appending `IF NOT EXISTS` to the command.
322
-
This ensures that no error is returned and nothing happens should the database alias already exist.
322
+
This ensures that no error is returned and nothing happens should a database or database alias with that name already exist.
323
323
+
324
324
.Query
325
325
[source, cypher]
@@ -328,7 +328,7 @@ CREATE ALIAS `northwind` IF NOT EXISTS FOR DATABASE `northwind-graph-2021`
328
328
----
329
329
330
330
* Appending `OR REPLACE` to the command.
331
-
This means that if the database alias already exists, it will be replaced with the new one.
331
+
This means that if a database alias with that name already exists, it will be replaced with the new one.
332
332
+
333
333
.Query
334
334
[source, cypher]
@@ -417,7 +417,7 @@ FOR DATABASE
417
417
418
418
You can also use `IF EXISTS` or `OR REPLACE` when creating remote database aliases.
419
419
It works the same way as described in the <<_use_if_exists_or_or_replace_when_creating_database_aliases, Use `IF EXISTS` or `OR REPLACE` when creating database aliases>> section.
420
-
Both check for any remote or local database aliases.
420
+
Both check for any remote or local database aliases (with `IF NOT EXISTS` also checking for databases).
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/composite-databases/create-composite-databases.adoc
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
Composite databases are managed using Cypher(R) administrative commands.
8
8
Note that it is not possible to modify access options or database topologies for composite databases as these are inherited from the constituent databases.
9
9
For information about modifying access options, see xref:database-administration/standard-databases/alter-databases.adoc#manage-databases-alter[Alter database access mode].
10
-
For information about about topologies for databases, see xref:clustering/setup/deploy.adoc#cluster-example-create-databases-on-cluster[Create databases in a cluster].
10
+
For information about topologies for databases, see xref:clustering/setup/deploy.adoc#cluster-example-create-databases-on-cluster[Create databases in a cluster].
11
11
12
12
Drivers and client applications connect to composite databases just like standard databases.
13
13
For more information, see the manuals for the different link:{neo4j-docs-base-uri}/create-applications/[Neo4j drivers and applications].
@@ -18,8 +18,8 @@ For more information, see the manuals for the different link:{neo4j-docs-base-ur
18
18
Composite databases can be created using `CREATE COMPOSITE DATABASE`.
19
19
20
20
Composite database names are subject to the same rules as xref:database-administration/standard-databases/naming-databases.adoc[standard databases].
21
-
One difference is however that the deprecated syntax using dots without enclosing the name in backticks is not available.
22
-
Both dots and dashes need to be enclosed within backticks when using composite databases.
21
+
One difference is however that in Cypher 5, the syntax using dots without enclosing the name in backticks is not available.
22
+
Both dots and dashes need to be enclosed within backticks when using composite databases in Cypher 5.
23
23
24
24
[NOTE]
25
25
====
@@ -66,7 +66,7 @@ For information about creating aliases in composite databases, see xref:database
66
66
The `CREATE COMPOSITE DATABASE` command is optionally idempotent, with the default behavior to fail with an error if the database already exists.
67
67
There are two ways to circumvent this behavior.
68
68
69
-
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and nothing happens should the database already exist.
69
+
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and nothing happens should a database or database alias with the given name already exist.
70
70
71
71
.Query
72
72
[source, cypher]
@@ -87,6 +87,7 @@ CREATE OR REPLACE COMPOSITE DATABASE inventory
87
87
This is equivalent to running `DROP DATABASE inventory IF EXISTS` followed by `CREATE COMPOSITE DATABASE inventory`.
88
88
89
89
The behavior of `IF NOT EXISTS` and `OR REPLACE` apply to both standard and composite databases (e.g. a composite database may replace a standard database or another composite database).
90
+
`IF NOT EXISTS` also catches if any database aliases with the given name exists and does nothing instead of throwing an error on existing alias sharing the name.
0 commit comments