Restoring a Cluster Snapshot

Use the mvmcli cluster snaprestore command to capture a snapshot of the cluster state.

Before you begin

Shut down all of the cluster members. The restore process will fail if any cluster member's address and port are occupied by a process.

Procedure

  1. Use the mvmcli cluster list command to display all the available cluster snapshots. For example, using the cluster for which a snapshot was captured in Capturing a Cluster Snapshot:
    # mvmcli cluster list
    Name                Profile     Cluster Contact Member   Create Time
    ---------------------------------------------------------------------------------
    ---------------------
    hz-cluster-1        hazelcast   10.0.0.63:5701           Tue Dec  1 16:09:15 2020
    Snapshots:               Status         Label               Create Time
                                            hz1-snap01          Tue Dec  1 16:32:05 2020
                                            hz1-snap02          Tue Dec  1 16:58:52 2020
    #
  2. Using the label chosen from the displayed cluster snapshots, restore the cluster snapshot with the mvmcli cluster snaprestore command.
    Important: Always restore cluster snapshots with the mvmcli cluster snaprestore command. Do not try to restore individual snapshots from a cluster snapshot using mvmcli snapshot restore. The mvmcli snapshot restore command will start simultaneous instances in the same application namespace, which can result in a process crash or data corruption.
    Warning:

    Replacing a certificate will cause restore of existing cluster snapshots to fail.

    If you create a Hazelcast cluster with TLS using a certificate, then replace the certificate in the Hazelcast cluster and on the coordinators, any snapshots you take before replacing the certificate cannot be restored. This is expected behavior; a snapshot should be restored only under the certificate it was captured with.

    For example:
    # mvmcli cluster snaprestore --name=hz-cluster-1 --label=hz1-snap01
    #
  3. Optional: To verify that all Hazelcast members in the cluster were restored, use the mvmcli snapshot list command on each Hazelcast host.