Skip to search

SnapshotPolicy

kopiur.home-operations.com / v1alpha1

apiVersion: kopiur.home-operations.com/v1alpha1 kind: SnapshotPolicy metadata: name: example
View raw schema
spec object required
What to back up: sources, identity, retention, policy, hooks.
compression object
Compression algorithm + per-extension opt-outs.
compressor string
kopia compressor name (e.g. `zstd`); absent leaves kopia's default.
neverCompress []string
Filename globs to leave uncompressed (e.g. already-compressed media).
copyMethod string
How the source volume is captured before kopia reads it: `Snapshot` (default), `Direct`, or `Clone`.
enum: Snapshot, Clone, Direct
credentialProjection object
Opt-in credential-Secret projection into each backup mover's namespace (default off).
enabled boolean
Copy the repository's credential Secret(s) into the namespace of each mover Job; off by default.
defaultDeletionPolicy string
Lifecycle of the underlying kopia snapshot when its `Snapshot` CR is deleted. Produced backups default to `Delete`; discovered snapshots are forced to `Retain`.
enum: Delete, Retain, Orphan
errorHandling object
Backup-side error handling: let a snapshot complete-with-errors instead of failing outright.
failFast boolean
Abort the snapshot at the first error instead of collecting and continuing (`snapshot create --fail-fast`; kopia default: false). This is a `snapshot create` argv flag, not a `policy set` knob, but lives beside its semantic opposites (`ignore*Errors`) for discoverability.
ignoreDirErrors boolean
Continue the snapshot when a directory cannot be read (`--ignore-dir-errors`).
ignoreFileErrors boolean
Continue the snapshot when a file cannot be read (`--ignore-file-errors`).
ignoreUnknownTypes boolean
Continue past entries of unknown type (`--ignore-unknown-types`).
extraArgs []string
Escape hatch for kopia flags not yet modeled.
files object
Paths/patterns kopia should skip while snapshotting.
ignoreCacheDirs boolean
Honor `CACHEDIR.TAG`.
ignoreIdenticalSnapshots boolean
Skip taking a new snapshot when the source is identical to the previous one.
ignoreRules []string
Filename/path globs to exclude from the snapshot (e.g. `*.tmp`, `*/cache/*`). Absent ⇒ [`default_ignore_rules`] (OS-artifact junk: `/lost+found`, `System Volume Information`, `$RECYCLE.BIN`, `@eaDir`, `.snapshot`). An explicit list REPLACES the default wholesale (re-add any entries you still want); explicit `ignoreRules: []` opts fully out. NOT `skip_serializing_if` — an explicit empty list must round-trip as `[]`, not vanish back to "absent" (which would silently resurrect the default on the next parse).
groupBy string
Multi-PVC grouping strategy. Defaults to a consistent group snapshot across all PVCs; set `None` *explicitly* to accept independent per-PVC snapshots, because a silent per-PVC fallback would produce inconsistent backups.
enum: VolumeGroupSnapshot, None
hooks object
Pre/post snapshot hooks that run in the workload, not the mover.
afterSnapshot []object
Hooks run (in order) after the snapshot completes — e.g. resuming the workload.
httpRequest object
Typed POST to a URL for cross-system orchestration.
body string
Optional request body.
continueOnFailure boolean
If `true`, a failed request does not abort the backup (default: abort).
method string
HTTP method (default `POST`).
timeout string
Max time to wait for the response (Go duration string).
url string required
Target URL to call.
runJob object
Full `JobSpec` run as a one-shot Job (k8up `PreBackupPod` analog).
continueOnFailure boolean
If `true`, a failed Job does not abort the backup (default: abort).
jobSpec object required
The full Kubernetes `JobSpec` to run.
timeout string
Max time to wait for the Job to complete (Go duration string).
workloadExec object
`kubectl exec`-style into a matched workload pod/container (the default form).
command []string
Command + args to run inside the selected container.
container string
Which container within the matched pod; absent uses the first/only container.
continueOnFailure boolean
If `true`, a failed hook does not abort the backup (default: abort).
podSelector object required
Label selector matching the workload pod(s) to read context/hooks from.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key string required
key is the label key that the selector applies to.
operator string required
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
values []string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
matchLabels object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
timeout string
Max time to wait for the command (Go duration string, e.g. `2m`).
beforeSnapshot []object
Hooks run (in order) before the snapshot is taken — e.g. quiescing a database.
httpRequest object
Typed POST to a URL for cross-system orchestration.
body string
Optional request body.
continueOnFailure boolean
If `true`, a failed request does not abort the backup (default: abort).
method string
HTTP method (default `POST`).
timeout string
Max time to wait for the response (Go duration string).
url string required
Target URL to call.
runJob object
Full `JobSpec` run as a one-shot Job (k8up `PreBackupPod` analog).
continueOnFailure boolean
If `true`, a failed Job does not abort the backup (default: abort).
jobSpec object required
The full Kubernetes `JobSpec` to run.
timeout string
Max time to wait for the Job to complete (Go duration string).
workloadExec object
`kubectl exec`-style into a matched workload pod/container (the default form).
command []string
Command + args to run inside the selected container.
container string
Which container within the matched pod; absent uses the first/only container.
continueOnFailure boolean
If `true`, a failed hook does not abort the backup (default: abort).
podSelector object required
Label selector matching the workload pod(s) to read context/hooks from.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key string required
key is the label key that the selector applies to.
operator string required
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
values []string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
matchLabels object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
timeout string
Max time to wait for the command (Go duration string, e.g. `2m`).
identity object
Identity overrides — what kopia records as `username@hostname:path`.
hostname string
Override the `hostname` portion of `username@hostname:path`; absent uses the resolved default.
username string
Override the `username` portion of `username@hostname:path`; absent uses the resolved default.
mover object
Per-recipe mover overrides (resources, cache, security context).
cache object
Override the repository's [`CacheDefaults`] for this recipe's movers.
capacity string
Size of the PVC backing the mover's kopia cache (e.g. `10Gi`).
contentCacheSizeMb integer
kopia content cache budget in MiB (`--content-cache-size-mb`).
format: int64
metadataCacheSizeMb integer
kopia metadata cache budget in MiB (`--metadata-cache-size-mb`).
format: int64
mode string
How a mover's kopia cache volume is provisioned.
enum: Ephemeral, Persistent
storageClassName string
StorageClass for the cache PVC; absent uses the cluster default.
inheritSecurityContextFrom object
Copy the UID/GID security context from a live workload instead of setting it explicitly.
pvcConsumer object
Backup sources only: auto-derive the workload from the PVC this snapshot backs up.
container string
Which container within the matched consumer pod to inherit from; absent uses the first/only.
workloadSelector object
Inherit from workload pod(s) matched by an explicit label selector (backup or restore).
container string
Which container within the matched pod; absent uses the first/only container.
podSelector object required
Label selector matching the workload pod(s) to read context/hooks from.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key string required
key is the label key that the selector applies to.
operator string required
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
values []string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
matchLabels object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
podSecurityContext object
Pod security context for the mover (notably `fsGroup` for group-writable restore volumes).
appArmorProfile object
appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
localhostProfile string
localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is "Localhost".
type string required
type indicates which kind of AppArmor profile will be applied. Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime's default profile. Unconfined - no AppArmor enforcement.
fsGroup integer
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.
format: int64
fsGroupChangePolicy string
fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.
runAsGroup integer
The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
format: int64
runAsNonRoot boolean
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
runAsUser integer
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
format: int64
seLinuxChangePolicy string
seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are "MountOption" and "Recursive". "Recursive" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. "MountOption" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. "MountOption" value is allowed only when SELinuxMount feature gate is enabled. If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes and "Recursive" for all other volumes. This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.
seLinuxOptions object
The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
level string
Level is SELinux level label that applies to the container.
role string
Role is a SELinux role label that applies to the container.
type string
Type is a SELinux type label that applies to the container.
user string
User is a SELinux user label that applies to the container.
seccompProfile object
The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
localhostProfile string
localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type.
type string required
type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
supplementalGroups []integer
A list of groups applied to the first process run in each container, in addition to the container's primary GID and fsGroup (if specified). If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows.
supplementalGroupsPolicy string
Defines how supplemental groups of the first container processes are calculated. Valid values are "Merge" and "Strict". If not specified, "Merge" is used. (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled and the container runtime must implement support for this feature. Note that this field cannot be set when spec.os.name is windows.
sysctls []object
Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.
name string required
Name of a property to set
value string required
Value of a property to set
windowsOptions object
The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
gmsaCredentialSpec string
GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
gmsaCredentialSpecName string
GMSACredentialSpecName is the name of the GMSA credential spec to use.
hostProcess boolean
HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
runAsUserName string
The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
privilegedMode boolean
Opt-in, namespace-gated privileged mode; preserves UID/GID on restore.
resources object
Resource requests/limits for the mover container.
claims []object
Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
name string required
Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
request string
Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.
limits object
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
requests object
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
securityContext object
Container security context for the mover; merged field-wise over the defaults and hardened base.
allowPrivilegeEscalation boolean
AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
appArmorProfile object
appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.
localhostProfile string
localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is "Localhost".
type string required
type indicates which kind of AppArmor profile will be applied. Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime's default profile. Unconfined - no AppArmor enforcement.
capabilities object
The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
add []string
Added capabilities
drop []string
Removed capabilities
privileged boolean
Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
procMount string
procMount denotes the type of proc mount to use for the containers. The default value is Default which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
readOnlyRootFilesystem boolean
Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
runAsGroup integer
The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
format: int64
runAsNonRoot boolean
Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
runAsUser integer
The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
format: int64
seLinuxOptions object
The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
level string
Level is SELinux level label that applies to the container.
role string
Role is a SELinux role label that applies to the container.
type string
Type is a SELinux type label that applies to the container.
user string
User is a SELinux user label that applies to the container.
seccompProfile object
The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
localhostProfile string
localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type.
type string required
type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
windowsOptions object
The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
gmsaCredentialSpec string
GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
gmsaCredentialSpecName string
GMSACredentialSpecName is the name of the GMSA credential spec to use.
hostProcess boolean
HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
runAsUserName string
The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
ttlSecondsAfterFinished integer
Per-recipe override of `Job.spec.ttlSecondsAfterFinished` so finished Jobs self-GC.
format: int64
preflight object
Named CEL preconditions evaluated before each backup run; opt-in (absent ⇒ no preflight). A failing check holds the `Snapshot` in `Pending` (`PreflightFailed`) and, after `timeout`, fails it.
checks []object
Checks that must **all** pass (AND) before the backup launches. An empty list is an inert no-op (symmetric with `verification` absent).
maxItems: 50
expr string required
CEL bool predicate; the backup proceeds only when this evaluates `true`.
message string
Optional human message surfaced alongside the check name when it blocks.
name string required
Stable identifier surfaced in the `Snapshot`'s status when this check blocks (e.g. `maintenance-fresh`). Unique within the policy.
minLength: 1
maxLength: 63
timeout string
How long to hold a `Snapshot` in `Pending` while a check is unsatisfied before failing it (Go-style duration like `10m` or `1h`; default `10m`). A zero duration (`0`/`0s`) holds indefinitely (never fail on preflight).
repository object required
Discriminated reference to a `Repository` or `ClusterRepository`.
kind string
Which repository CRD this points at; defaults to [`RepositoryKind::Repository`].
enum: Repository, ClusterRepository
name string required
Name of the referenced `Repository`/`ClusterRepository`.
namespace string
Cross-namespace `Repository` reference; ignored/forbidden for `ClusterRepository`.
retention object
GFS retention, enforced by the operator pruning `Snapshot` CRs.
keepAnnual integer
Keep one snapshot per year for the most-recent N years.
format: uint32
minimum: 0
keepDaily integer
Keep one snapshot per day for the most-recent N days.
format: uint32
minimum: 0
keepHourly integer
Keep one snapshot per hour for the most-recent N hours.
format: uint32
minimum: 0
keepLatest integer
Keep the N most-recent snapshots regardless of age.
format: uint32
minimum: 0
keepMonthly integer
Keep one snapshot per month for the most-recent N months.
format: uint32
minimum: 0
keepWeekly integer
Keep one snapshot per week for the most-recent N weeks.
format: uint32
minimum: 0
sources []object
What to back up (at least one source; webhook-enforced).
maxItems: 100
nfs object
An inline NFS export to back up directly, mounted read-only. Mutually exclusive with `pvc`/`pvcSelector`.
path string required
Exported path on the NFS server (e.g. `/export/kopia` or `/mnt/eros/Media`).
server string required
NFS server hostname or IP (e.g. `nas.lan` or `expanse.internal`).
pvc object
Single PVC by name. Mutually exclusive with `pvcSelector`/`nfs`.
name string required
Name of the `PersistentVolumeClaim` to back up (in the `SnapshotPolicy`'s namespace).
pvcSelector object
Label/namespace selector matching many PVCs. Mutually exclusive with `pvc`/`nfs`.
labelSelector object
Standard Kubernetes label selector matching the PVCs to include.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key string required
key is the label key that the selector applies to.
operator string required
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
values []string
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
matchLabels object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
namespaceSelector object
Restricts the search to specific namespaces; absent means the policy's own namespace.
matchNames []string
Exact namespace names to search; empty means the policy's own namespace.
sourcePathOverride string
What kopia records as the source path (default `/pvc/<name>`, or the NFS export `path`).
maxLength: 4096
sourcePathStrategy string
How a selector-matched PVC's source path is derived. Only relevant for `pvcSelector` sources, where one recipe expands to many PVCs and each needs a distinct kopia source path. Defaults to `PvcName`.
enum: PvcName, PvcNamespacedName
staging object
Staging knobs for `copyMethod: Snapshot`/`Clone` (e.g. how long to wait for the CSI capture to become ready before failing the backup).
accessModes []string
Access modes for the staged PVC. Empty ⇒ copy the source PVC's modes. `[ReadOnlyMany]` pairs with snapshot-backed read-only classes (e.g. CephFS `backingSnapshot`); the mover always mounts the staged PVC read-only regardless of the mode.
storageClassName string
StorageClass for the **staged PVC** — the temporary PVC restored from the CSI `VolumeSnapshot` (`copyMethod: Snapshot`) or cloned from the source (`copyMethod: Clone`). Absent ⇒ the staged PVC copies the source PVC's class. Must belong to the **same CSI driver** as the source (staging fails fast on a mismatch). Flagship use: a rook-ceph CephFS class with `backingSnapshot: "true"`, which mounts the snapshot shallowly (metadata-only, near-instant, read-only) instead of running a full subvolume clone that can take many minutes on small-file-heavy volumes.
timeout string
How long each staging phase may take before the backup is failed (Go-style duration like `10m` or `1h`; default `10m`): first the staged `VolumeSnapshot` becoming `readyToUse` (measured from its creation), then — on an `Immediate`-binding StorageClass — the staged PVC binding (a fresh budget measured from the PVC's creation, covering the CSI restore/clone). A transient CSI/snapshot-controller error during either wait is retried, never fatal on its own — only this deadline fails staging. A zero duration (`0`/`0s`) waits indefinitely. Raise this for backends whose snapshots or clones take long (e.g. cloud snapshots of large volumes, CephFS full clones of small-file-heavy volumes).
suspend boolean
Pause this recipe declaratively (schedules and reconcile skip a suspended policy).
upload object
Upload parallelism (kopia's `--max-parallel-snapshots` / `--max-parallel-file-reads`).
limitMb integer
`snapshot create --upload-limit-mb`: abort the snapshot once this many MB have been uploaded (kopia default: 0 — unlimited). Named `limitMb` rather than `uploadLimitMb` to avoid the `upload.uploadLimitMb` stutter; like `failFast`, this is a `snapshot create` argv flag, not a `policy set` knob, but lives here beside its parallelism siblings.
format: int64
maxParallelFileReads integer
`--max-parallel-file-reads`: file-read concurrency within a snapshot.
format: int64
maxParallelSnapshots integer
`--max-parallel-snapshots`: how many sources snapshot concurrently.
format: int64
verification object
First-class backup verification; opt-in (absent ⇒ no verification runs).
deep object
Schedule + knobs for the rarer scratch-restore test; absent ⇒ no deep verification.
capacity string
Size of the ephemeral scratch PVC (e.g. `10Gi`); absent falls back to a node-ephemeral `emptyDir`.
parallel integer
`restore --parallel`: restore parallelism for the scratch-restore (deep verify IS a restore under the hood); absent leaves kopia's default.
format: uint32
minimum: 0
schedule object required
Cron + jitter for the deep restore-test (e.g. weekly).
cron string required
The cron expression, parsed by `croner`; may contain an `H` placeholder for deterministic jitter.
jitter string
Optional deterministic jitter window as a Go-style duration string (e.g. `30m`).
timezone string
IANA timezone the cron is evaluated in (e.g. `America/Chicago`); absent uses the enclosing schedule's timezone, else the controller default (UTC).
storageClassName string
StorageClass for the ephemeral scratch PVC; absent uses the cluster default (only with `capacity`).
quick object
Quick (blob-level) verification tier; absent ⇒ no quick verification. Its cron lives under `quick.schedule` (matching `deep.schedule`), see [`QuickVerification`].
fileParallelism integer
`--file-parallelism`: parallelism for file verification (kopia default: unset).
format: uint32
minimum: 0
fileQueueLength integer
`--file-queue-length`: queue length for file verification (kopia default: 20000).
format: uint32
minimum: 0
maxErrors integer
`--max-errors`: stop after this many errors (kopia default: 0, meaning stop at the first error).
format: uint32
minimum: 0
parallel integer
`--parallel`: verification parallelism (kopia default: 8).
format: uint32
minimum: 0
schedule object
Cron + jitter + timezone for the frequent blob-level verify; absent ⇒ quick tier disabled.
cron string required
The cron expression, parsed by `croner`; may contain an `H` placeholder for deterministic jitter.
jitter string
Optional deterministic jitter window as a Go-style duration string (e.g. `30m`).
timezone string
IANA timezone the cron is evaluated in (e.g. `America/Chicago`); absent uses the enclosing schedule's timezone, else the controller default (UTC).
successExpr string
CEL pass/fail predicate over the verify result; applies to both tiers.
verifyFilesPercent integer
How many files `quick` verifies fully (`--verify-files-percent`); absent leaves kopia's default.
format: uint8
minimum: 0
maximum: 255
volumeSnapshotClassName string
`VolumeSnapshotClass` used when `copyMethod` snapshots/clones the source.
status object
Observed state of a `SnapshotPolicy`.
conditions []object
Standard Kubernetes conditions (e.g. `RepositoryReachable`, `GroupSnapshotSupported`).
lastTransitionTime string required
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
message string required
message is a human readable message indicating details about the transition. This may be an empty string.
observedGeneration integer
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
format: int64
reason string required
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
status string required
status of the condition, one of True, False, Unknown.
type string required
type of condition in CamelCase or in foo.example.com/CamelCase.
lastSuccessfulSnapshot string
RFC3339 timestamp of the most recent successful child `Snapshot` from this recipe.
lastVerified string
RFC3339 timestamp of the most recent successful verification (any tier).
observedGeneration integer
`metadata.generation` last reconciled, for staleness detection.
format: int64
resolved object
What would be passed to kopia — pinned at admission.
identity object
The resolved `username@hostname` identity.
hostname string required
The final `hostname` kopia records, fixed at admission.
sourcePath string
The resolved snapshot source path, when applicable (`username@hostname:path`).
username string required
The final `username` kopia records, fixed at admission.
sources []object
The concrete PVCs + source paths after selector expansion.
pvc string
`namespace/name` of the PVC, as kopia sees it.
sourcePath string
The source path kopia records for this PVC.
retention object
Summary of GFS retention pruning against this config's `Snapshot` CRs.
activeSnapshotCount integer
CRs currently inside the GFS window.
format: int64
lastPruneAt string
RFC3339 timestamp of the last prune pass.
lastPruneDeleted integer
Number of `Snapshot` CRs deleted by the last prune pass.
format: int64

No matches. Try .spec.compression for an exact path