Capturing a Cluster Snapshot
After configuring Memory Machine and Hazelcast, use the mvmcli cluster snapshot command to capture a snapshot of the cluster state.
Before you begin
Warning: Improperly configuring Memory Machine or Hazelcast can make it impossible to restore a Hazelcast cluster. Always
test cluster snapshot create and cluster snapshot
restore with your configuration before applying your configuration
in production.
About this task
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. Plan accordingly.
Important: When capturing a cluster snapshot, the
Hazelcast cluster and all Hazelcast members must be in the Active state. When
capturing a cluster snapshot, Memory Machine temporarily changes the Hazelcast cluster to the Passive state for the duration
of the capture process. Once the cluster snapshot is captured, Memory Machine changes the Hazelcast cluster back to the Active state.
Important: Cluster snapshot does not support
tmux. You cannot restore a TTY session from a cluster
snapshot. See Restoring a TTY Session for information
about restoring a TTY session from an individual snapshot.
Procedure
-
On the Primary Coordinator host, issue the following command to capture a
snapshot of the registered Hazelcast cluster.
mvmcli cluster snapcreate --name=cluster_name --label=snap_label
where:- cluster_name
- is the name under which you registered the cluster. See Preparing Hazelcast to Work with Memory Machine.
- snap_label
- is a base name that you assign to the label of the snapshot.
-
If the command fails, check the error log to determine the cause of the
failure.
# cd /var/log/memverge # less mvcsnapd_log
-
If the command was successful, use the mvmcli cluster list command to verify
that the cluster snapshot was captured and to display the Hazelcast member
snapshots. For example:
# mvmcli cluster list --members 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 Members: Address Coordinator Label 10.0.0.62:5701 10.0.0.62:5679 hz1-snap01_75099ae5 10.0.0.62:5702 10.0.0.62:5679 hz1-snap01_2b7e554d 10.0.0.63:5701 10.0.0.63:5679 hz1-snap01_c89cd515 10.0.0.63:5702 10.0.0.63:5679 hz1-snap01_5abfa3c1
To see the cluster snapshot without the member snapshot list, omit the --members option.