Unified Backup
Unified Backup offers a concise, one-click solution to back up application and cluster resources across all clusters in Fleet, supporting varying granularities from individual namespaces to multiple namespaces, and up to entire clusters. This ensures consistent data protection and facilitates swift recovery in a distributed cloud-native infrastructure.
Introduction
Backup Types
Unified Backup supports two primary backup methods to cater to different requirements, ensuring data is safely stored and can be restored when necessary.
Immediate Backup
- Use Case: Essential for sudden changes, like after a significant data update or before implementing system alterations.
- Functionality: Triggers a one-time backup on demand.
Scheduled Backup
- Use Case: Regularly back up dynamic data to safeguard against accidental losses, maintain compliance, and enable efficient disaster recovery.
- Functionality: Set automated backups at specific intervals using cron expressions.
Advanced Backup Options
- Specific Cluster Backup within Fleet: Users can choose one or more particular clusters within the Fleet for backup.
- Resource Filtering: Kurator offers filtering options for more precise backups, allowing users to define criteria based on attributes like name, namespace, or label.
Note: Kurator supports backing up and restoring Kubernetes volumes attached to pods directly from the file system. Snapshot support is currently unavailable. Refer to the documentation FSB for more information.
How to Perform a Unified Backup
In the subsequent sections, we’ll guide you through a hands-on demonstration. Before delving into the details, ensure you have successfully installed the backup plugin as outlined in the backup plugin installation guide.
For this demonstration, we will be using the fleet and two kind clusters, as created in the backup plugin installation guide.
You can initiate the process by deploying a test application using the following command:
Executing the above command will deploy the test busybox across two clusters within the fleet. For a comprehensive understanding about app-backup-demo.yaml, please refer to the unified application distribution.
Due to constraints associated with restic, performing a PV backup in the kind cluster (the environment we’re currently operating in) is a challenging issue.
Hence, our subsequent examples will mainly feature busybox. However, in a real-world cluster setup, users can opt for the busybox-with-pv example.
1. Performing an Immediate Backup
Apply an immediate backup example:
Review the results:
The expected result should be:
Given the output provided, let’s dive deeper to understand the various elements and their implications:
- In the spec, the
destinationfield is used. By default, if no specific cluster is set, it points to all clusters within thefleet. - The
policydefines the backup strategy. Using theresourceFilter, it specifies that the backup should target resources with the labelapp: busybox. For more advanced filtering options, refer to the Fleet API - The
statussection displays the actual processing status of the two clusters within the fleet.
Furthermore, you can check your backup data in object storage; it will appear in the bucket used during the plugin configuration.
2. Performing a Scheduled Backup
Apply the scheduled backup:
Review the results:
The expected result should be:
Analyzing the provided output, let’s dissect its sections for a clearer comprehension:
-
Cron Expression in
spec:- The
schedulefield within thespecuses a cron expression. This defines when a backup is to be performed. - The expression ‘*/5 * * * *’ means the backup will run every 5 minutes. This setting is for testing purposes only. Users should adjust this parameter based on their actual needs.
- Once set, the backup won’t be executed immediately. Instead, it waits until the time specified by the cron expression.
- The
-
Destination in
spec:- The
destinationfield underspecpoints tokurator-member2. This means the backup is specifically for this cluster within its fleet.
- The
-
Policy in
spec:- The
policysection outlines the backup strategy. If nopolicyspecified, all cluster resource will be backup. - For more advanced filtering options, refer to the Fleet API
- The
-
Status Section:
- The
statussection provides an overview of the backup status across clusters. - At the moment, it’s empty. As backups are executed according to the cron schedule, this section will populate with relevant details.
- The
Cleanup
To remove the backup examples used for testing, execute:
Please note: This command only deletes the current object in the k8s API. For data security, deletion of the data in object storage should be performed using the tools provided by the object storage solution you adopted. Kurator currently does not offer capabilities to delete data inside the object storage.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.