-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
User Story
As a Kubernetes operator,
I want ksail cluster backup and ksail cluster restore commands,
So that I can backup and restore a cluster's Kubernetes resources and persistent volumes for disaster recovery or cluster migration.
Acceptance Criteria
Backup Command (ksail cluster backup)
- Creates a backup archive (
.tar.gz) containing Kubernetes resources and volume data. - Backs up all Kubernetes resources as YAML files organized by namespace (similar to Velero's tarball approach).
- Backs up persistent volume data using file system backup (copying data from PVCs).
- Includes a
backup.yamlmetadata file with: version, timestamp, cluster name, distribution, provider, and list of backed-up resources. - Supports
--include-volumesflag to back up persistent volume data (default: true). - Backs up resources in a consistent order (CRDs → Namespaces → StorageClasses → PVs → PVCs → Secrets → ConfigMaps → Services → Deployments → etc.).
Restore Command (ksail cluster restore)
- Restores Kubernetes resources from a backup archive to a target cluster.
- Restores resources in the correct order (CRDs first, then namespaces, then storage resources, then workloads).
- Restores persistent volume data by provisioning new PVCs and copying data back.
- Supports
--existing-resource-policyflag with options:none(skip existing, default) orupdate(patch existing resources). - Labels restored resources with
ksail.io/backup-nameandksail.io/restore-namefor traceability.
Limitations (v1)
- No secret encryption in v1 (secrets exported as plain YAML - recommend using SOPS separately).
- No cloud provider volume snapshots in v1 (uses file system backup approach only).
- No Hetzner/block storage snapshots in v1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status