Skip to content

VolumeRestore

volumerestores.backups.k8s.bnerd.com/v1

One-time restore of backed-up data to a new or existing PVC. Creates a Kubernetes Job that runs Restic restore.

Short names: vrestore, vr

Spec

You must specify either sourceBackup or sourceRepository (not both).

spec.sourceBackup

Restore from an existing VolumeBackup resource.

Field Type Required Description
volumeBackupRef.name string Yes VolumeBackup name
volumeBackupRef.namespace string No VolumeBackup namespace (defaults to resource namespace)
snapshotId string No Specific snapshot ID (defaults to latest)
snapshotDate date-time No Restore snapshot closest to this date

spec.sourceRepository

Restore directly from a Restic repository.

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
host string No Filter snapshots by host
snapshotId string No Specific snapshot ID
snapshotDate date-time No Restore snapshot closest to this date

spec.targetPVC (required)

Field Type Default Description
createNew boolean true Create a new PVC
name string {restore-name}-restored PVC name (required if createNew=false)
storageClass string (from source) Storage class for new PVC
size string (from source) PVC size
accessMode string "ReadWriteOnce" PVC access mode
annotations map[string]string -- Annotations for new PVC
labels map[string]string -- Labels for new PVC

spec.restoreSpec

Field Type Default Description
paths string[] ["/"] Paths to restore
exclude string[] -- Patterns to exclude
targetPath string "/" Target path within PVC
overwrite string "always" always, if-changed, if-newer, never

spec.jobConfig

Field Type Default Validation Description
retries integer 3 0--10 Retry attempts for failed restore
backoffLimit integer 6 min: 0 Kubernetes Job backoff limit
activeDeadlineSeconds integer -- min: 1 Job timeout in seconds
keepSuccessfulJobs integer 3 0--10 Successful Jobs to retain
keepFailedJobs integer 3 0--10 Failed Jobs to retain

spec.resources

Field Type Default
requests.memory string "256Mi"
requests.cpu string "200m"
limits.memory string "1Gi"
limits.cpu string "1000m"

spec.image

Field Type Default
repository string "registry.bnerd.com/public/restic"
tag string "0.18.1"
pullPolicy string "Always"

spec.kubeconfig

Field Type Default
inCluster boolean true
secretRef.name string --
secretRef.namespace string --
secretRef.key string "kubeconfig"

spec.nodeSelector, spec.tolerations, spec.affinity

Same as VolumeBackup.

Status

Field Type Description
phase string Pending, Running, Succeeded, Failed, Retrying
startTime date-time When restore started
completionTime date-time When restore completed
duration string Human-readable duration (e.g., "5m30s")
message string Human-readable status message

status.progress

Field Type Description
filesTotal integer Total files to restore
filesRestored integer Files restored so far
bytesTotal integer Total bytes
bytesRestored integer Bytes restored
percentComplete number 0--100

status.sourceInfo

Field Type Description
snapshotId string Snapshot being restored
snapshotDate date-time Snapshot date
repository string Repository URL
host string Host tag
paths string[] Paths being restored

status.targetInfo

Field Type Description
pvcName string Target PVC name
pvcNamespace string Target PVC namespace
storageClass string Storage class
size string PVC size
created boolean Whether PVC was created by this restore

status.jobInfo

Field Type Description
currentJob string Name of current Job
attempt integer Current attempt number
totalAttempts integer Total attempts made
jobHistory[] array History of all job attempts

Each entry in jobHistory:

Field Type Description
jobName string Job name
attempt integer Attempt number
phase string Job phase
startTime date-time Start time
completionTime date-time Completion time
message string Status message

status.conditions

Same structure as VolumeBackup conditions.

Printer Columns

kubectl get volumerestore displays:

Column Source
Source spec.sourceBackup.volumeBackupRef.name
Target PVC status.targetInfo.pvcName
Phase status.phase
Progress status.progress.percentComplete
Duration status.duration
Age metadata.creationTimestamp