You can manually delete any backup at any time.
Procedure
- Connect to the VM deployer and execute below command:
export KUBECONFIG=/root/.kube/<KubeConfig File>
- To delete the backup, run the following command:
~> kubectl delete backup.tcx.vmware.com <backup-name>
Note:- The provided command deletes the backup Custom Resource (CR) from the cluster, but it does not delete the associated backup data. If you wish to delete both the backup CR and its associated data, you can accomplish this by expiring the backup. For more information, see Backup Expiration.
- If the MinIO is deployed as statefulset backed by Persistent Volumes, once the Kubernetes cluster is deleted, the backups are deleted too. To retain the backup, deploy MinIO as gateway and trigger the backup, so that the backup is available in the external S3 object store or NFS File Server. The backups previously taken when MinIO was deployed as statefulset will not be available on MinIO deployed as gateway.
Some key information about the backup deletion or retention policy:- Deleting a backup file is a permanent operation. You cannot recover a deleted backup.
- The retention policies can be set during the deployment time for all the backups or it can be set during the individual backup creation time.
- After the expiration, the backup will be removed and cleaned from the object store and the list of available backups.
- Following are the backup policy details:
- numberOfDaysToKeep
- successfulBackupsToKeep
- failedBackupsToKeep
Note: The successfulBackupsToKeep takes precedence over the numberOfDaysToKeep field. If the number of backups exceeds the limit, the oldest backup is removed based on the value set in successfulBackupsToKeep.