Back Up and Restore a User Cluster
Warning
🚧 This guide is a work in progress: the result of collecting user feedback from this Release Candidate (RC) phase.
Reach us on cloud-support@switch.ch if you have comments of questions about this new feature.
Introduction
This guide explains how to use the integrated User Cluster (UC) backup feature in Switch Cloud Kubernetes (SCK).
You will learn how to:
- Prepare a Switch Cloud S3-backed Backup Storage Location.
- Create a manual backup for a cluster.
- Restore a cluster from a UC backup.
- Configure recurring backup schedules.
Info
UC backup is an opt-in feature that is billed separately from the base cluster fee.
The feature is currently in Release Candidate (RC) stage and is provided without guarantees or SLA. It will be announced and billed once validated and released when it will reach General Availability (GA).
Step 0: Prerequisites
Before configuring UC backups in SCK, make sure you have:
- An existing SCK project and cluster.
- Access to the cluster as a project owner or editor.
- A Switch Cloud S3 (SCS3) bucket for backup data.
- An SCS3 access key pair (
Access Key IDandSecret Access Key) from the Switch Cloud Portal.
If you still need to prepare S3 credentials and CLI access, follow: User Authentication and Authorization (S3)
Step 1: Create a Backup Storage Location
To enable backups for one or more clusters, first create a Backup Storage Location in SCK that points to your SCS3 bucket.
- In SCK, open your project and navigate to Cluster Backups > Storage Locations.
- Click on '+ Create Backup Storage Location'.
- Provide:
- A name.
- The target bucket name.
- (Optional) A prefix inside the bucket.
- The S3
Access Key IDandSecret Access Key. - The S3 endpoint URL from Switch Cloud S3. Including
https://as the schema.- e.g.
https://zhw-a.s3.cloud.switch.ch
- e.g.
- Save the configuration.
After creation, SCK validates the storage location and makes it available for backup operations.
Step 2: Create a Manual Cluster Backup
Once the storage location is configured and assigned to your cluster, create a one-time backup:
- Open Cluster Backups > Backups.
- Select your cluster from the
Clusterdropdown. - Click '+ Create Cluster Backup'.
- Define backup options and confirm.
Backup options
- Namespaces: You can back up all namespaces, or only selected namespaces.
- Persistent Volumes: Persistent Volume backup is enabled by default.
- Expires in: Retention period for the backup. The default is 30 days.
After creation, the backup starts immediately and appears in the backup list with its status.
Step 3: Restore a Cluster from a UC Backup
To restore from an existing and Completed User Cluster backup:
- Open the backup list for the target cluster (Cluster Backups > Backups).
- Search and select the backup to restore.
- Click the Restore Backup icon.
- Enter a restore name and select restore scope (for example, all or selected namespaces).
- Confirm and monitor progress in Cluster Backup > Restores.
The restore process creates a restore request and reconciles resources from the selected backup.
Step 4: Define a Backup Schedule
To automate recurring backups:
- Open Cluster Backups > Schedules.
- Select your cluster.
- Click '+ Create Backup Schedule'.
- Configure:
- Schedule name.
- Cron expression (backup frequency).
- Backup scope (all namespaces or selected namespaces).
- Retention (
expires in).
- Save the schedule.
Each scheduled run creates a new backup according to the defined policy.
Notes and Recommendations
- Use a dedicated S3 bucket (or a dedicated prefix strategy) for better separation and lifecycle management.
- Choose retention based on recovery needs and storage costs.
- Test restore procedures regularly to validate backup quality.