VolumeSnapshotBackup
volumesnapshotbackups.backups.k8s.bnerd.com/v1
Creates point-in-time backups via OpenStack Cinder volume snapshots, then backs up the snapshot data to a Restic repository.
Short name: vsb
Spec
spec.volumeClaimRef (required)
| Field |
Type |
Required |
Description |
name |
string |
Yes |
Name of the PVC to back up |
namespace |
string |
No |
PVC namespace (defaults to resource namespace) |
spec.openstack
| Field |
Type |
Default |
Description |
credentialsSecretRef.name |
string |
-- |
Secret with OpenStack credentials (OS_* env vars) |
credentialsSecretRef.namespace |
string |
-- |
Secret namespace |
region |
string |
-- |
OpenStack region (or set OS_REGION_NAME in Secret) |
autoDiscover |
boolean |
true |
Auto-detect Cinder volume ID from PV |
spec.snapshot
| Field |
Type |
Default |
Description |
force |
boolean |
true |
Allow snapshots of in-use volumes |
timeout |
integer |
600 |
Seconds to wait for snapshot to become available |
namePrefix |
string |
"backup" |
Prefix for snapshot names |
retention.keepLast |
integer |
3 |
Keep last N OpenStack snapshots |
retention.keepForDays |
integer |
7 |
Keep snapshots for N days |
spec.temporaryVolume
| Field |
Type |
Default |
Description |
storageClass |
string |
(from source PVC) |
Storage class for temporary PVC |
timeout |
integer |
300 |
Seconds to wait for PVC to bind |
spec.repository (required)
| Field |
Type |
Required |
Description |
type |
string |
Yes |
s3, gcs, azure, local, sftp, rest |
url |
string |
Yes |
Repository URL |
secretRef.name |
string |
Yes |
Secret with credentials |
secretRef.namespace |
string |
No |
Secret namespace |
spec.host
| Type |
Default |
Description |
| string |
{namespace}-{pvc-name} |
Restic host tag |
spec.paths
| Type |
Default |
Description |
| string[] |
["/"] |
Paths to back up (relative to PVC root) |
spec.exclude
| Type |
Description |
| string[] |
Patterns to exclude from backup |
spec.retention
| Field |
Type |
Description |
keepLast |
integer |
Keep last N Restic snapshots |
keepDaily |
integer |
Keep daily snapshots |
keepWeekly |
integer |
Keep weekly snapshots |
keepMonthly |
integer |
Keep monthly snapshots |
keepYearly |
integer |
Keep yearly snapshots |
spec.cache
| Field |
Type |
Default |
Description |
enabled |
boolean |
false |
Enable cache PVC |
size |
string |
"1Gi" |
Cache size |
storageClass |
string |
-- |
Storage class |
spec.resources
| Field |
Type |
Default |
requests.memory |
string |
"256Mi" |
requests.cpu |
string |
"200m" |
limits.memory |
string |
"2Gi" |
limits.cpu |
string |
"2000m" |
spec.image
| Field |
Type |
Default |
repository |
string |
"registry.bnerd.com/public/restic" |
tag |
string |
"0.18.1" |
pullPolicy |
string |
"IfNotPresent" |
spec.nodeSelector, spec.tolerations, spec.affinity
Same as VolumeBackup.
Status
| Field |
Type |
Description |
phase |
string |
Pending, CreatingSnapshot, CreatingVolume, Backup, Cleanup, Succeeded, Failed |
message |
string |
Human-readable status message |
status.currentSnapshot
| Field |
Type |
Description |
id |
string |
OpenStack snapshot UUID |
name |
string |
Snapshot name |
cinderVolumeId |
string |
Source Cinder volume ID |
status |
string |
Snapshot status |
createdAt |
string |
Creation timestamp |
sizeGB |
integer |
Snapshot size in GB |
status.temporaryVolume
| Field |
Type |
Description |
pvcName |
string |
Temporary PVC name |
pvName |
string |
Temporary PV name |
cinderVolumeId |
string |
Temporary Cinder volume ID |
status |
string |
Volume status |
status.backupJob
| Field |
Type |
Description |
name |
string |
Job name |
status |
string |
Job status |
startTime |
string |
Start time |
completionTime |
string |
Completion time |
status.lastBackup
| Field |
Type |
Description |
timestamp |
string |
Completion timestamp |
status |
string |
Backup status |
duration |
string |
Backup duration |
Printer Columns
kubectl get volumesnapshotbackup displays:
| Column |
Source |
| Phase |
status.phase |
| PVC |
spec.volumeClaimRef.name |
| Last Backup |
status.lastBackup.timestamp |
| Age |
metadata.creationTimestamp |