NATS Backup
We run NATS on Kubernetes via its Helm chart which is based on Stateful sets.
We use velero to backup the complete NATS workload and persist them to remote storage. It will also take snapshots of associated volumes. We’ve completed testing it on our pre-staging environment. See gitlab-org/analytics-section/platform-insights/core#42.
Frequency of backup
Section titled “Frequency of backup”TBD. This will be completed with gitlab-org/analytics-section/platform-insights/core#83. This can be anything from 1h to 12h or more.
We will also apply a retention policy on backups in remote-storage with bucket life cycle policies.
Restore procedure
Section titled “Restore procedure”Backups made by velero
can be restored by using the Restore API available.
An example resource to execute a restore looks like this:
apiVersion: velero.io/v1kind: Restoremetadata: name: nats-restore namespace: velero labels: restore-type: disaster-recoveryspec: backupName: nats-backup ## modify this to point to specific backup created by velero
includedNamespaces: - nats
# Restore persistent volumes restorePVs: true
preserveNodePorts: true
includeClusterResources: true
includedResources: - '*'
This resource can be applied to the cluster and it will restore all NATS kubernetes resources onto cluster.
For more details on the workflow and available configuration, see velero
restore reference doc.