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.

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.

Note that the unbind command preserves all database stores on the server. When the unbound server is restarted and enabled, it is seen as an entirely new server. Therefore, there is no guarantee that the allocator will pick this server to host the same databases. This may lead to having orphaned database stores on this server.

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