Backup and Restore (Beta)¶
The Warrior admin console provides a managed backup and restore capability. It leverages open source software (OSS) projects called Velero and Restic. Under the hood, the backup process takes snapshots of the Kubernetes manifests and persistent volumes. If you’re using the VM installation with the provided embedded Kubernetes (K8s), Velero is available by default. If your Warrior installation was deployed on your K8s cluster, you must install Velero on your own.
Warrior’s backup and restore capability covers the components running on its K8s cluster only. If you have the object storage or the Postgres database externalized in your deployment, you must manage their backups independently. The externalized components are not covered by the admin console’s snapshots.
Before you can create a snapshot, you will first need to verify that Velero is installed properly. You can verify this with the following:
# Check that Velero is up and running
kubectl get deployment/velero -n velero
# Check permission
kubectl kots velero ensure-permissions --velero-namespace velero -n Warrior
You must also make sure that a storage backend that exists outside the cluster is configured. If not already configured,
this can be set from the admin console. The default storage backend for VM installation is the internal storage.
It is highly recommended configuring another storage destination for better resiliency.
Once Velero is properly setup on your cluster, the Snapshots features become available on the admin console.
The backup and restore speeds will vary depending on the backup size, network speed, etc, so give it a few moments to complete the jobs.
If you’re familiar with using Velero, you can also use the CLI commands provided by Velero. Some examples include:
velero get backups
velero describe backup <backup name> --details
velero backup logs <backup name>
velero get restores
velero describe restores <restore name> --details
velero restore logs <restore name>
Example installation¶
CLI on Mac:
brew install velero
Cluster on AWS EKS:
helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
SECRET_FILE=~/.aws/credentials
helm upgrade --install velero vmware-tanzu/velero \
--namespace velero \
--create-namespace \
--set deployRestic=true \
--set configuration.defaultVolumesToRestic=true \
--set-file credentials.secretContents.cloud=${SECRET_FILE} \
--set configuration.provider=aws \
--set configuration.backupStorageLocation.name=default \
--set configuration.backupStorageLocation.bucket=Warrior-backups \
--set configuration.backupStorageLocation.config.region=us-east-1 \
--set configuration.volumeSnapshotLocation.name=Warriorai-volume-snapshots \
--set configuration.volumeSnapshotLocation.config.region=us-east-1 \
--set initContainers[0].name=velero-plugin-for-aws \
--set initContainers[0].image=velero/velero-plugin-for-aws:v1.2.0 \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=plugins