Kopia repository maintenance (Garbage Collection) runs successfully but fails to reclaim S3 backup storage. GC identifies large amounts of unused contents but only deletes a small fraction of unreferenced blobs. Continuous maintenance cycles complete without decreasing the overall S3 bucket size after 24+ hours.
VMware Kuberentes Service
Velero releases below v1.17
The Kopia backup repository contains stale and incomplete snapshots. This is a known issue with older versions of Velero and Kopia where incomplete snapshots are not automatically tracked or deleted by Velero. These incomplete checkpoints prevent blob rewrite and compaction from freeing space, as the data remains associated with orphaned, hidden checkpoints.
Incomplete snapshots are untracked by Velero and must be manually deleted via the Kopia CLI to release S3 storage.
Identify incomplete snapshots using the Kopia CLI. Note that most storage may be concentrated in specific large namespaces/PVCs rather than distributed evenly.
Unpin the incomplete snapshot to make it eligible for deletion: kopia snapshot pin remove <SNAPSHOT_ID> --all (Example: kopia snapshot pin remove kc7279b25b3d7e71917aca3bfc4dbc976 --all)
Delete the manifest record for the target snapshot: kopia snapshot delete <SNAPSHOT_ID> --delete
Unlink the metadata pointers by running manual garbage collection: kopia snapshot gc
kopia maintenance run --full (Note: You may need to wait for several maintenance cycles for this to fully complete and retain free space. The aggresive method is with using the "--foce" option which may have drawbacks, hence not recommended for busy production workloads. For more information, refer to Additional Information)
Note: After snapshot deletion, multiple full maintenance runs must complete sequentially. The released data is marked for deletion by maintenance jobs but will not be physically purged from the S3 bucket until Kopia's internal safety time buffer expires.
Ensure you are only deleting untracked, incomplete snapshots. Incomplete snapshots are not used or tracked by Velero; unless manual data restoration via the Kopia CLI is required, they can be safely removed.
Review corresponding backup logs for underlying errors causing the incomplete checkpoints.
When validating small GC reclamations, confirm the overall repository footprint. Many repositories may inherently be small (e.g., kube-prometheus-stack), while the bulk of unreleased data resides in specific large volumes (e.g., integration-ms-ns).
Related GitHub tracking for older releases and memory increase issues:
Velero Issue 9866: https://github.com/velero-io/velero/issues/9866
Velero Issue 9314: https://github.com/velero-io/velero/issues/9314
Kopia PR 3465: https://github.com/kopia/kopia/pull/3465