Unbind a Neo4j cluster server

You can use the neo4j-admin server unbind command to remove and archive the cluster state of a cluster server so that it can rebind to a cluster.

Due to the new clustering architecture in Neo4j 5.x, the behavior of the unbind command has changed significantly compared to Neo4j 4.4.

Running the unbind command on any number of servers may result in the loss of cluster quorum, severely affecting clustering functionality. Therefore, it is strongly recommended to consult with Neo4j Support before using the unbind command.

In Neo4j 5.x, 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.

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.

Syntax

The neo4j-admin server unbind command has the following syntax:

neo4j-admin server unbind [-h] [--expand-commands] [--verbose]
                          [--archive-cluster-state[=true|false]]
                          [--additional-config=<file>]
                          [--archive-path=<path>]

Options

The neo4j-admin server unbind command has the following options:

Table 1. neo4j-admin server unbind options
Option Description Default

--additional-config=<file>[1]

Configuration file with additional configuration.

--archive-cluster-state[=true|false]

Enable or disable the cluster state archiving.

false

--archive-path=<path>

Destination (file or folder) of the cluster state archive.

--expand-commands

Allow command expansion in config value evaluation.

-h, --help

Show this help message and exit.

--verbose

Enable verbose output.

1. See Tools → Configuration for details.

Limitations

The Neo4j server must be shut down before running the neo4j-admin server unbind command.

Usage

You can use the neo4j-admin server unbind command to remove the cluster state of a cluster server, turn a cluster server into a standalone server, or remove and archive the cluster state of a cluster server.

Remove the cluster state of a server

To remove the cluster state of a server, run the neo4j-admin server unbind command from the <NEO4J_HOME> folder of that server. When restarted, an unbound server rejoins the cluster as a new server and has to be enabled using the ENABLE SERVER command.

Turn a cluster member into a standalone server

To start the Neo4j server in single (standalone) mode after unbinding it from the cluster, verify that initial.server.mode_constraint is set to NONE in The neo4j.conf file.

Archive cluster state

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>:

bin/neo4j-admin server unbind --archive-path=/path/to/archive-folder --archive-cluster-state=true

The default resultant file is named:

unbound_cluster_state.<YYYYMMDDHH24MM>.zip