Restore a cluster from backup
Before attempting to restore the cluster state using the Velero command-line interface, you should verify the following requirements:
The backend storage, MinIO, is still operational.
The Velero platform service in the cluster is still operational.
The Velero platform service is set to a
restore-only-mode
to avoid having backups run while restoring.
To list the available backup archives for your cluster, run the following command:
velero backup get
To set Velero to a restore-only-mode
, run the following command:
velero server --restore-only=true
This mode is being deprecated and will be removed in Velero in Velero v2.0. Use read-only backup storage locations instead.
Finally, check your deployment to verify that the configuration change was applied correctly:
helm get values -n kommander velero
To restore cluster data on demand from a selected backup snapshot available in the cluster, run a command similar to the following:
velero restore create --from-backup BACKUP-NAME
Restore your DKP Management Cluster
When restoring a backup to the Management Cluster, you must adjust configuration to avoid restore errors.
Before restoring a backup, ensure the following ResourceQuota
setup is not configured on your cluster:
When completed, the manually removed ResourceQuota
named one-kommandercluster-per-kommander-workspace
restores automatically.
Turn off the Workspace
validation webhooks. Otherwise, you will not restore Workspaces with pre-configured namespaces. If the validation webhook named kommander-validating
is present, it must be modified with the command:
kubectl patch validatingwebhookconfigurations kommander-validating \
--type json \
--patch '[
{
"op": "remove",
"path": "/webhooks/0/rules/3/operations/0"
}
]'
When the backup completes, re-add the removed CREATE
webhook rule operation with:
kubectl patch validatingwebhookconfigurations kommander-validating \
--type json \
--patch '[
{
"op": "add",
"path": "/webhooks/0/rules/3/operations/0",
"value": "CREATE"
}
]'