Enabling snapshots repository

To take snapshots make sure you enable the OpenSearch snapshot repository in the CR.

About this task

Follow this procedure to take snapshots of your OpenSearch data by enabling the OpenSearch snapshot repository.

Procedure

  1. Check the OpenSearch CR instance by retrieving the name of the instance.
    kubectl get Cluster opensearch -n <namespace>
  2. Edit the OpenSearch CR and update parameter snapshotRepo.snapshotActivity value to backup.
    kubectl edit Cluster opensearch -n <namespace>

Example


backup:
 enable: true
 sizeLimit: 50Gi
 snapshotPVC: ""
 snapshotPVCStorageClass: rook-cephfs
Table 1. Parameter description
Parameter Description
backup Provide an elasticsearch snapshot repo via a shared volume
backup.enable

Enable/disable the Elasticsearch snapshot repo. Changing this value may require a restart/rebuild of the Elasticsearch cluster. If disabled it must not be deployed to a namespace which is backed up by Velero CSI snapshots.

backup.snapshotPVCStorageClass Storage class to use for the shared volume used by the snapshot repo
backup.snapshotPVC (Optional) override the PVC name
backup.sizeLimit Size of the snapshot volume
Note:

To perform backup and restore backup.enable must be true in the CR section. This creates /workdir/snapshot_storage, on OpenSearch file system to host all the backups.