content/operate/rs/7.8/clusters/cluster-recovery.md
When a Redis Enterprise Software cluster fails, you must use the cluster configuration file and database data to recover the cluster.
{{< note >}} For cluster recovery in a Kubernetes deployment, see [Recover a Redis Enterprise cluster on Kubernetes]({{< relref "/operate/kubernetes/re-clusters/cluster-recovery" >}}). {{< /note >}}
Cluster failure can be caused by:
To recover a cluster and re-create it as it was before the failure,
you must restore the cluster configuration ccs-redis.rdb to the cluster nodes.
To recover databases in the new cluster, you must restore the databases from persistence files such as backup files, append-only files (AOF), or RDB snapshots.
These files are stored in the [persistent storage location]({{< relref "/operate/rs/7.8/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage" >}}).
The cluster recovery process includes:
/ccs/ccs-redis.rdb on the persistent storage for each node.(Optional) If you want to recover the cluster to the original cluster nodes, uninstall Redis Enterprise Software from the nodes.
[Install Redis Enterprise Software]({{< relref "/operate/rs/7.8/installing-upgrading/install/install-on-linux" >}}) on the new cluster nodes.
The new servers must have the same basic hardware and software configuration as the original servers, including:
{{< note >}} The cluster recovery can fail if these requirements are not met. {{< /note >}}
Mount the persistent storage drives with the recovery files to the new nodes. These drives must contain the cluster configuration backup files and database persistence files.
{{< note >}} Make sure that the user redislabs has permissions to access the storage location of the configuration and persistence files on each of the nodes. {{< /note >}}
If you use local persistent storage, place all of the recovery files on each of the cluster nodes.
To recover the original cluster configuration, run [rladmin cluster recover]({{< relref "/operate/rs/7.8/references/cli-utilities/rladmin/cluster/recover" >}}) on the first node in the new cluster:
rladmin cluster recover filename [ <persistent_path> | <ephemeral_path> ]<filename> node_uid <node_uid> rack_id <rack_id>
For example:
rladmin cluster recover filename /tmp/persist/ccs/ccs-redis.rdb node_uid 1 rack_id 5
When the recovery command succeeds, this node is configured as the node from the old cluster that has ID 1.
To join the remaining servers to the new cluster, run [rladmin cluster join]({{< relref "/operate/rs/7.8/references/cli-utilities/rladmin/cluster/join" >}}) from each new node:
rladmin cluster join nodes <cluster_member_ip_address> username <username> password <password> replace_node <node_id>
For example:
rladmin cluster join nodes 10.142.0.4 username [email protected] password mysecret replace_node 2
Run [rladmin status]({{< relref "/operate/rs/7.8/references/cli-utilities/rladmin/status" >}}) to verify the recovered nodes are now active and the databases are pending recovery:
rladmin status
{{< note >}} Make sure that you update your [DNS records]({{< relref "/operate/rs/7.8/networking/cluster-dns" >}}) with the IP addresses of the new nodes. {{< /note >}}
After the cluster is recovered, you must [recover the databases]({{< relref "/operate/rs/7.8/databases/recover.md" >}}).