Unbind a Core Server

This section describes how to remove cluster state data for a Neo4j server.

1. Command

The cluster state of a cluster member can be removed by using the following command:

1.1. Syntax

neo4j-admin unbind [--verbose]
                   [--expand-commands]
                   [--archive-cluster-state=<true/false>]
                   [--archive-path=<path>]

1.2. Options

Option Default Description

--verbose

Enable verbose output.

--expand-commands

Allow command expansion in config value evaluation.

--archive-cluster-state

false

Enable or disable the cluster state archiving.

--archive-path

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

Limitations

The Neo4j server process should be shutdown before running the unbind command.

Examples of usage

  • When transforming a cluster member to a standalone server:

    The unbind command can be used to turn a Core server in a cluster into a standalone server. To start the database in single (standalone) mode after unbinding it from the cluster, first set dbms.mode=SINGLE in neo4j.conf.

  • When seeding a cluster with existing store files:

    If you wish to seed a new cluster using the store files of a previous cluster, you must first run neo4j-admin unbind on each server. For more information about seeding clusters, see Seed a cluster.

If a cluster holds a previous version of any of the databases being seeded, you must DROP those databases before seeding. Alternatively, you can stop every instance, unbind them from the cluster using neo4j-admin unbind and then forcefully restore the correct seeds (backups) for the databases in question. If you do not DROP or unbind before seeding, either with neo4j-admin restore or neo4j-admin load, the database’s store files and cluster state will be out of sync, potentially leading to logical corruptions.
  • When recovering a cluster:

    In the event of serious failures you may need to recover an entire cluster from backups. Before restoring those backups, you must first run neo4j-admin unbind on each server. For more information about recovering databases from online backups, see Restore a database backup.

Unlike versions of Neo4j prior to v4.0.0, you must run the unbind command on both Read Replicas and Core members.