How to Clean Up Veeam Kasten for Kubernetes Manual Backups
| KB ID: | 4619 |
| Product: | Veeam Kasten for Kubernetes |
| Published: | 2024-06-14 |
| Last Modified: | 2024-06-14 |
Purpose
Cause
With Veeam Kasten for Kubernetes, there are multiple ways to take backups & exports.
- A manual backup/export from the application menu.
- A manual policy run with the `Run Once` button.
- A scheduled policy run.
The outcome of all the above workflows is the same: a local and exported restorePoint is created inVeeam Kasten for Kubernetes, respectively. However, retention is different for each approach.
- Any restorePoints created as a part of scheduled policy runs follow retention configured in the policy.
- A manual backup/export run or a manual policy run is retained forever until it is deleted manually.
Veeam Kasten provides an option to specify the expiration time when the manual backup/export is triggered. These are automatically retired when the expiration time has elapsed.
It is recommended to set expiration time whenever a manual backup/export or policy run is triggered, as it avoids manual intervention.
There might be situations where backup/exports are created before a change in the application or upgrade of infrastructure components. In such situations, these restorePoints would only be retired if manually deleted or the expiration time is elapsed. This needs handling as removing restorepoints over time is easily missed, which could cause capacity issues in the storage.
Solution
Labeling Explanation
Consider the following regarding the methods used to label restorepoints:
- After a successful backup/export, Veeam Kasten creates the restorePoint with the label including the name of the policy that created it (e.g., k10.kasten.io/policyName).
- Since a manual backup/export is not policy-driven, no policy label is included. However, if an expiration time was set during the action, that expiration is set as a label (k10.kasten.io/expiresAt) in the restorepointcontent.
- For the restorepoints which are created using the run once button, Kasten adds the label: k10.kasten.io/isRunNow
Identifying RestorePointContents using Filters
The examples below demonstrate how to use what is known about labeling to accurately identify restorepointcontens that need to be removed.
Retiring the manual backup/export from the application menu
The command below can be used to filter restorePointContents without a policyName and without an expiresAt label.
Example output:
NAME CREATED AT mysql-manualbackup-45zg2 2022-05-19T10:34:26Z
The output of the above command also has a creation timestamp that can be used to find the old ones and delete them.
Retiring the restorepoints from manual policy run with the `Run Once` button.
We can use the labels k10.kasten.io/isRunNow and k10.kasten.io/expiresAt to filter the restorepointcontents that were run manually without an expiration date.
Example output:
NAME CREATED AT kasten-io-scheduled-b6rkr 2022-05-05T09:16:31Z
The output of restorepointcontents can be used to retire them in a timely manner.
Deleting the restorepointcontents
The following command can be used to delete the restorepointcontents that were manually created:
More Information
Automating RestorePointContent Clean Up
The example below can be used in a cronjob to regularly delete such manual restorepoints that are more than a month old.
If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.