Helm chart supports creating a snapshot backup of DevOps Insight Server (DOIS) Elasticsearch (ES) indices.
You can access this functionality by enabling the ES backup
flag during implementation.
This flag creates an extra PersistentVolumeClaim (PVC) for storing snapshots of ES indices.
A cron job is also added to take a snapshot backup.
By default, this snapshot backup occurs every 12 hours.
You can access a snapshot backup using restore, upgrade, or restore job functionality.
Limitations
The Snapshot backup mechanism has one limitation. When running more than one ES backup, all backups must have access to the same folder. Therefore, we recommend using a shared file system when running DOIS in clustered mode.
Version compatibility
A snapshot contains a copy of the on-disk data structures that comprise an index or a data stream’s backing indices. This means that snapshots can only be restored to versions of Elasticsearch that can read the indices.
The following table indicates ES snapshot compability with DOIS versions.
2.x | 5.x | 6.x | 7.x | 8.x | |
---|---|---|---|---|---|
Snapshot version 1.x |
|
|
|
|
|
Snapshot version 2.x |
|
|
|
|
|
Snapshot version 5.x |
|
|
|
|
|
Snapshot version 6.x |
|
|
|
|
|
Snapshot version 7.x |
|
|
|
|
|
Configuring a snapshot backup
To configure a snapshot backup, you must enable Helm chart support of an ES backup and restore by adding the following information to the values.yaml configuration:
dois:
# Enable or disable creating backup volumes for dois
backup:
# enables creating backup volume and deploying backup cron job
enabled: true
# schedule cron to create snapshot of ES indices, default to every 12 hrs
schedule_cron: "0 */12 * * *"
# No of Days snapshots to retain
retentionDays: 15
# location where ES backup volume mounts on / path. Recommended to keep it as it is.
location: "es-backups"
# image repository for backup/restore cron jobs.
imageRepository: cbflow-tools
# restoreSnapshot enable this option to restore latest snapshot from
# snapshot repository.
restoreSnapshot: false
# Name of Snapshot to restore if need to restore older snapshot
restoreSnapshotName:
The following is a result of the values.yaml file modifications:
-
An extra backup PVC is created for storing indices snapshots.
-
A Kubernetes CronJob is created. This CronJob:
-
Runs periodically creating a snapshot of indices. The run frequency is set in
schedule_cron
parameter. -
Purges old snapshots according to the
retentionDays
parameter.
-
Restoring a snapshot backup
To restore a snapshot backup, you must set the dois.backup.restoreSnapshot
parameter to true
during a subsequent installation or upgrade:
Considerations:
-
Snapshot
: You cannot restore an ES backup into a cluster running an earlier version. For example, a 7.6.0 snapshot cannot be used to restore a 7.5.0 cluster. -
Indices
: You cannot restore indices into a cluster that is more than one major version newer than the ES version used to create the snapshot.
# restoreSnapshot enable this option to restore latest snapshot from
# snapshot repository.
restoreSnapshot: true
# Name of Snapshot to restore if need to restore older snapshot
restoreSnapshotName:
Disabling a snapshot restore on the next upgrade
To disable a snapshot restore, you must set the dois.backup.restoreSnapshot
parameter to false
during a subsequent installation or upgrade:
# restoreSnapshot enable this option to restore latest snapshot from
# snapshot repository.
restoreSnapshot: false
# Name of Snapshot to restore if need to restore older snapshot
restoreSnapshotName: