You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As "a K8up User" I want "to back up PVCs via an intermediate snapshot or cloned volume" So that "I gain atomicity and performance from snapshotting and the portability of Restic backups"
Context
Instead of directly mounting volumes for backup we could introduce an annotation to instruct K8up to create a snapshot of a PVC, instantiate a PVC from that snapshot, and run the Backup from that volume. This affect the following aspects of a backup, depending on the internal workings of the used CSI Driver:
Consistency
If a Volume is slow compared to its size a backup can take a long time, which can introduce consistency issues in the data. Some Backends/CSI Drivers/VolumeSnapshotClasses guarantee crash consistency, which would also transfer to the K8up Backups while using them.
Performance
The performance characteristics of volumes is defined per volume on most public clouds. By backing up from a snapshot, all provisioned bandwidth can go into running the backup, while the application is not affected.
Open Questions
Snapshot+Restore vs. Cloning
Both mechanisms are related to each other but some CSI Driver that implement one, don`t implement the other (Source). Direct volume cloning would make the K8up code simpler, but would reduce compatibility.
I am only speculating here, since I have not read CSI driver code for Drivers that implement both, but there might be different implementations for Snapshots and Cloning that affect consistency and speed.
Personally I think, that it is necessary to implement both a Snapshot+Restore and a Cloning code path
Out of Scope
Replacing how backups are done without CSI involvement
Non-CSI Vendor specific implementations of snapshotting
I think this is possible to implement without breaking the existing K8up API.
"Backup Mode Annotation"
My intuitive idea would be this Annotation on the PVC:
k8up.io/via-csi: "snapshot" or "clone" or omitted for backup without CSI involvement
k8up.io/csi-volume-snapshot-class: "custom-volume-snapshot-class"
You probably do not want to make this flag available on Pods, since they can mount PVCs from multiple different CSI drivers. It might be also a reasonable idea to make this annotation work on StorageClasses.
Removing Snapshots and intermediate volumes after completing/canceling a Backup
It necessary to add a finalizer to the Backup resource on creation and remove it on completing the backup to ensure no dangling PVCs and Snapshots.
The text was updated successfully, but these errors were encountered:
Summary
As "a K8up User"
I want "to back up PVCs via an intermediate snapshot or cloned volume"
So that "I gain atomicity and performance from snapshotting and the portability of Restic backups"
Context
Instead of directly mounting volumes for backup we could introduce an annotation to instruct K8up to create a snapshot of a PVC, instantiate a PVC from that snapshot, and run the Backup from that volume. This affect the following aspects of a backup, depending on the internal workings of the used CSI Driver:
Consistency
If a Volume is slow compared to its size a backup can take a long time, which can introduce consistency issues in the data. Some Backends/CSI Drivers/VolumeSnapshotClasses guarantee crash consistency, which would also transfer to the K8up Backups while using them.
Performance
The performance characteristics of volumes is defined per volume on most public clouds. By backing up from a snapshot, all provisioned bandwidth can go into running the backup, while the application is not affected.
Open Questions
Snapshot+Restore vs. Cloning
Both mechanisms are related to each other but some CSI Driver that implement one, don`t implement the other (Source). Direct volume cloning would make the K8up code simpler, but would reduce compatibility.
I am only speculating here, since I have not read CSI driver code for Drivers that implement both, but there might be different implementations for Snapshots and Cloning that affect consistency and speed.
Personally I think, that it is necessary to implement both a Snapshot+Restore and a Cloning code path
Out of Scope
Further links
Acceptance Criteria
No response
Implementation Ideas
I think this is possible to implement without breaking the existing K8up API.
"Backup Mode Annotation"
My intuitive idea would be this Annotation on the PVC:
You probably do not want to make this flag available on Pods, since they can mount PVCs from multiple different CSI drivers. It might be also a reasonable idea to make this annotation work on StorageClasses.
Removing Snapshots and intermediate volumes after completing/canceling a Backup
It necessary to add a finalizer to the Backup resource on creation and remove it on completing the backup to ensure no dangling PVCs and Snapshots.
The text was updated successfully, but these errors were encountered: