Snapshot
kopiur.home-operations.com / v1alpha1
apiVersion: kopiur.home-operations.com/v1alpha1
kind: Snapshot
metadata:
name: example
spec object required
A single kopia snapshot represented as a Kubernetes object.
deletionPolicy
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
description
string
Free-form text recorded on the kopia snapshot manifest
(`snapshot create --description`). Per-invocation by nature —
scheduled/discovered `Snapshot`s never set this (no templated
descriptions).
maxLength:
1024failurePolicy object
Mover Job retry and deadline limits for this run.
activeDeadlineSeconds
integer
Mover `Job.spec.activeDeadlineSeconds` — wall-clock cap after which a running run is killed.
format:
int64
backoffLimit
integer
Mover `Job.spec.backoffLimit` — retries before a failed run is marked failed.
format:
int32
podStartupDeadlineSeconds
integer
Seconds a non-starting (wedged) mover pod may sit before the run is failed; default 300s.
format:
int64mover object
Per-run mover overrides for THIS snapshot's Job (resources, cache budgets,
`securityContext`, `privilegedMode`, `ttlSecondsAfterFinished`).
Layered field-wise as `repository.moverDefaults < policyRef's mover <
this mover` — the highest layer that sets a field wins, and a field you
omit falls through, so a partial override here can only adjust what it
names. This exists so an ad-hoc one-shot (`kubectl create` before a risky
change, a debug run that needs more memory or a different UID) does not
require editing the shared, GitOps-managed `SnapshotPolicy` that every
scheduled run also uses.
Two deliberate exclusions:
* `mover.cache` here is **run-scoped only**. It sets this run's kopia cache
budgets (`--content-cache-size-mb`/`--metadata-cache-size-mb`) and, when
the cache is `Ephemeral`, that Job's cache-volume `capacity` and
`storageClassName` — a generic ephemeral volume bound to this pod and
GC'd with it. What it cannot touch is anything **shared**: `cache.mode`
is policy-owned (a per-run `mode: Persistent` never mints the shared
PVC), and under `mode: Persistent` the PVC's own `capacity`/
`storageClassName` come from the policy alone, because that claim is
named per-POLICY and every sibling `Snapshot` depends on it.
* `inheritSecurityContextFrom.snapshot` is restore-only and rejected here,
exactly as on `SnapshotPolicy`: a backup's identity comes from the live
workload; it is the run that *records* an identity.
An elevated mover assembled here is gated by the namespace's
`privileged-movers` opt-in just like a policy-level one — the gate runs on
the merged result.
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 rather than hard-coding it.
Requires the workload to pin `runAsUser` (container or pod level): a UID that comes
from the container image's `USER` line is invisible in the pod spec and cannot be
inherited — the mover would silently run as its own image's UID instead.
May be combined with `securityContext`/`podSecurityContext`, which override it
field-wise and act as the fallback when no workload pod can be resolved.
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.
snapshot
object
Restores only: inherit the identity RECORDED on the backup itself
(`Snapshot.status.recorded`, decoded from the `kopiur-meta` kopia tag) —
uid/gid/fsGroup the backup mover actually ran as. Needs no live workload
pod, so it works on a rebuilt cluster and with `target.populator`.
Rejected at admission on SnapshotPolicy/Maintenance (backups read the
live workload; maintenance has no snapshot). Write it as `snapshot: {}`
(an empty sub-object) — a bare `snapshot:` is null and rejected.
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). Same layering as `securityContext`: highest layer, merged field-wise, and
combinable with `inheritSecurityContextFrom`.
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 hardened base,
`moverDefaults`, and any inherited context — this is the highest layer, so every field
set here wins. Combines with `inheritSecurityContextFrom`: fields you set override the
workload's, fields you omit are inherited, and this context stands in alone when
inheritance cannot resolve a pod.
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:
int64seLinuxOptions 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
onScheduleDelete
string
What the deletion of a `SnapshotSchedule` does to the `Snapshot` CRs it
produced (which Kubernetes GC cascade-deletes via their ownerReference).
Default `Retain`: the CRs are removed but their kopia snapshots survive and
the catalog rediscovers them as `origin: discovered`. `Delete` opts into the
cascade: each Snapshot's own `deletionPolicy` applies.
Deliberately 2-variant (not reusing [`DeletionPolicy`]): an `Orphan` in
cascade position would differ from `Retain` only in per-CR event/metric
bookkeeping — an invalid state made unrepresentable. The guard's `Retain`
is exactly `DeletionPolicy::Retain`'s semantics (CR removed, kopia snapshot
stays, catalog rediscovers it), deliberately NOT the `Orphan` event storm
(no per-CR "orphaned" event/metric for every produced Snapshot).
enum:
Retain, Delete
pin
boolean
Exempt this snapshot from GFS retention.
policyRef object
The `SnapshotPolicy` recipe to run; absent for `discovered` backups.
name
string required
Name of the referenced `SnapshotPolicy`.
namespace
string
Namespace of the `SnapshotPolicy`; absent = same namespace as the referrer.
repository object
The ONE repository this `Snapshot` targets, pinned by value at mint
time. Stamped by a multi-repository `SnapshotPolicy` fan-out (each child
covers exactly one member of the policy's repository set) and by
`SnapshotReplication` copy CRs (the destination repository). Absent for
the legacy single-repository case, where the policy's own
`spec.repository` (or, for catalog rows, the owning repository CR) is
the answer — an absent pin resolves exactly as before this field
existed, so pre-feature `Snapshot`s are untouched.
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`.
source object
The ONE concrete source this `Snapshot` covers, when `policyRef` names a
recipe whose `sources[]` expands to many — i.e. a
[`pvcSelector`](crate::snapshot_policy::PvcSelector).
Stamped by whoever minted the CR: a `SnapshotSchedule` fire, or
`kubectl kopiur snapshot now`. Absent for the ordinary single-source
case, where the policy's own `sources[0]` is the target.
Absent against a *selector* policy is refused rather than guessed. The
operator must never pick a PVC on the user's behalf: silently backing up
one arbitrary volume out of N looks exactly like success.
group object
The consistency group this child belongs to, present only when the
policy asked for one (`groupBy: VolumeGroupSnapshot`) AND the expansion
produced more than one member in this namespace.
namespace
string required
Namespace the `VolumeGroupSnapshot` lives in.
A `VolumeGroupSnapshot` is namespaced and its `source.selector` is
namespace-local, so a selector spanning namespaces yields ONE GROUP PER
NAMESPACE, not one group. The consistency guarantee is per-namespace and
this field is where that shows.
volumeGroupSnapshotName
string required
Name of the shared `VolumeGroupSnapshot`.
sourceIndex
integer required
Zero-based index into `policyRef`'s `spec.sources` this child expanded
from.
Pins WHICH source's knobs (`readOnly`, `sourcePathOverride`,
`sourcePathStrategy`, `acknowledgeLiveMutation`) govern this run, so a
policy carrying several sources stays unambiguous. An index that is out
of range at reconcile time — the policy shrank mid-run — is a named
terminal failure, never a silent fallback to `sources[0]`.
format:
uint32minimum:
0target object required
What the expansion resolved to.
pvc object
One `PersistentVolumeClaim`, fully qualified.
name
string required
Name of the matched `PersistentVolumeClaim`.
namespace
string required
Namespace of the matched `PersistentVolumeClaim`.
Explicit rather than inferred from the `Snapshot`'s own namespace: a
`pvcSelector` under a `ClusterRepository` may match across namespaces.
tags
object
Free-form tags attached to the kopia snapshot manifest itself
(`snapshot create --tags`), e.g. `reason: pre-upgrade` — durable in the
repository, independent of this CR. Keys must be non-empty, colon-free
(kopia splits on the first colon), and must not start with the reserved
`kopiur` prefix; at most 10 tags, keys ≤ 63 bytes, values ≤ 256 bytes
(webhook-enforced).
status object
Observed state of a [`Snapshot`].
cleanup object
Post-run cleanup bookkeeping, so each cleanup runs at most once per Snapshot.
credsReapedAt
string
When the run's projected credential Secrets were reclaimed (RFC 3339);
absent until the reap has run. A projected copy is only needed while a mover
Job can still load it via `envFrom`, but it is owner-ref'd to this CR, which
long outlives that Job — so without an explicit reap it would sit in the
workload namespace holding live repository credentials until the CR is pruned
(#240).
conditions []object
Standard Kubernetes conditions (e.g. `SourcesQuiesced`, `SnapshotCreated`).
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.
copiedFrom object
Lineage for `origin: replicated` rows: the source repository, source
manifest id, and `startTime` the copy was migrated from. Written by the
`SnapshotReplication` mover in the same atomic PATCH as
`status.snapshot`; absent on every other origin. See [`CopiedFrom`] for
why this lives on the CR rather than as kopia tags.
repository object required
The SOURCE repository the snapshot was migrated from (the
`SnapshotReplication`'s `sourceRef`, resolved at run time).
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`.
sourceManifestId
string required
The kopia manifest id the snapshot had in the SOURCE repository.
Migrate assigns a NEW manifest id on the destination
(`status.snapshot.kopiaSnapshotID`); this is the old one, kept for
cross-repository correlation.
startTime
string required
The snapshot's RFC3339 `startTime` — preserved verbatim by migrate and
the key (together with the identity triple) both idempotent re-migration
and `pruning: mirrorSource` correlate source and destination rows on.
failure object
Structured terminal-failure detail (kopia error class, stderr tail, retry hint).
exitCode
integer
The process exit code, if one was reported.
format:
int32
kopiaErrorClass
string required
kopia error class (e.g. `RepositoryUnavailable`, `AuthFailure`).
message
string required
A short human-readable message: what failed, why, and how to fix it.
op
string
The mover operation that failed, as a stable label (e.g.
`repository connect`, `snapshot create`) — the values of the mover's
`KopiaOp::as_str()`. Distinguishes a repository-level connect failure
from a source-level failure (a broken PVC), which share
`kopiaErrorClass` values (e.g. `NotFound`). Absent on failures that
occurred outside a kopia invocation.
retryRecommended
boolean required
Whether retrying the same operation unchanged could succeed.
stderrTail
string
The last lines of kopia's stderr, if any were captured (bounded by
[`MAX_LOG_TAIL_BYTES`]).
hooks object
Hook-execution bookkeeping so each hook list runs exactly once per Snapshot.
postCompletedAt
string
When the `afterSnapshot` list completed (RFC3339); absent until it has.
preCompletedAt
string
When the `beforeSnapshot` list completed (RFC3339); absent until it has.
job object
The mover Job backing this run; absent for discovered.
attempts
integer
Number of attempts so far (bounded by `failurePolicy.backoffLimit`).
format:
int32
name
string
Name of the mover `Job`.
logTail
string
The last lines of the run's output, written by the mover at the terminal transition.
observedGeneration
integer
`metadata.generation` last reconciled, for staleness detection.
format:
int64
origin
string
How a `Snapshot` came to exist. Canonical value mirrored from the
`kopiur.home-operations.com/origin` label. Origin drives the deletion-policy
default: `discovered` backups are forced to `Retain` because the operator did
not create those snapshots.
enum:
scheduled, manual, discovered, adopted, replicated
phase
string
Lifecycle phase of a `Snapshot`.
enum:
Pending, Running, Succeeded, Failed, Deleting, Discovered, Unchanged
pinned
boolean
The observed kopia-side pin state: `Some(true)` if pinned, `Some(false)` if unpinned, `None` before any pin reconcile.
preflightSince
string
RFC 3339 timestamp of the first reconcile where the repository was `Ready`
but a `spec.preflight` check was failing. The one-shot anchor for the
preflight `timeout` deadline (so the budget covers preflight only, not the
earlier repository-not-Ready wait). Cleared once every preflight check passes,
so a later failing episode gets a fresh budget rather than a stale anchor.
recorded object
The mover identity recorded on the kopia snapshot itself (the
`kopiur-meta` tag): the resolved effective uid/gid/fsGroup the backup ran
as, plus its provenance. Produced runs stamp this at launch (from the
same value written into the tag); discovered rows decode it from the tag
during the catalog scan. Absent for pre-feature snapshots, foreign
backups without the tag, or a tag this operator version cannot decode.
fsGroup
integer
The resolved pod-level `fsGroup` the mover ran with (the hardened
default is `65532`). Absent = no layer set one.
format:
int64
gid
integer
The resolved effective `runAsGroup` the mover ran as at backup time
(container `runAsGroup`, else pod). Absent = image-determined.
format:
int64
schema
integer required
The `kopiur-meta` schema version this value was written under. Writers
emit the lowest schema that represents the data (currently
[`KOPIUR_META_SCHEMA_V1`]); readers reject only a schema NEWER than they
understand (degrading to recorded-absent, never an error).
format:
int64
src
string required
Which layer pinned the recorded identity. Only `inherited` means the
identity tracked the workload.
enum:
inherited, explicit, defaults, unknown
uid
integer
The resolved effective `runAsUser` the mover ran as at backup time
(container `runAsUser`, else pod). Absent = no layer pinned a UID, so
the mover's UID was image-determined.
format:
int64resolved object
Frozen recipe values at run time (scheduled/manual).
credentialProjection object
The recipe's `spec.credentialProjection` as it stood for this run.
The deletion path re-projects the mover's credentials, but the opt-in lives on the
`SnapshotPolicy` — which a user may delete first. Pinning it here lets the finalizer
honor the opt-in that was actually in force, instead of reading an absent recipe as
"projection off" and blocking on a Secret that was never meant to be namespace-local
(#255). Absent only on a `Snapshot` that predates the pin or never ran; a run always
writes it, including `enabled: false`, so absent stays distinguishable from off.
enabled
boolean
Copy the repository's credential Secret(s) into the namespace of each mover Job; off by default.
repository object
The repository this run targeted, frozen at run time.
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`.
sources []object
The concrete PVCs + source paths backed up this run.
pvc
string
`namespace/name` of the PVC, as kopia sees it.
sourcePath
string
The source path kopia recorded for this PVC.
snapshot object
The kopia artifact this CR represents.
description
string
The kopia snapshot description (`snapshot create --description`), when
one is recorded and non-empty. For discovered rows this is copied from
the repository listing TRUNCATED to 1024 bytes (char-boundary-safe) —
the value is foreign-writer-controlled and must never fail the CR write.
identity object required
The `username@hostname:path` identity recorded for this snapshot.
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.
kopiaSnapshotID
string required
kopia's snapshot ID — the handle the finalizer uses to delete content.
staged object
The CSI staging objects the run created for `copyMethod: Snapshot`/`Clone`.
copyMethod
string
The resolved capture method (`Snapshot` or `Clone`) that produced this stage.
pvcName
string
Name of the staged `PersistentVolumeClaim` the mover mounts in place of the live source PVC.
ready
boolean
`true` once the stage is ready for the mover.
stagingTimeoutSeconds
integer
The resolved `spec.staging.timeout` (seconds) pinned when the stage was
stamped, so the running-Job staged-PVC bind watchdog never re-resolves a
policy that may have been edited or deleted mid-run. `0` = wait
indefinitely.
format:
int64
storageClassName
string
StorageClass of the staged PVC — `spec.staging.storageClassName` when set,
else the source PVC's class. Pinned for observability (e.g. confirming a
CephFS shallow-clone class actually took effect).
volumeGroupSnapshotName
string
Name of the shared CSI `VolumeGroupSnapshot` this member staged from,
when the recipe asked for a consistency group
([`groupBy: VolumeGroupSnapshot`](crate::snapshot_policy::GroupBy)).
Recorded because the group is otherwise invisible: it deliberately
carries no ownerReferences (see `io::group_staging`), so this is how an
operator tells which capture a backup came from — and how `kubectl
kopiur doctor` finds one that outlived its members.
volumeSnapshotName
string
Name of the `VolumeSnapshot` created from the source PVC (`copyMethod: Snapshot` only).
stats object
Byte/file counts parsed from kopia's JSON output.
bytesNew
integer
Bytes newly uploaded this run (after dedup/compression).
format:
int64
filesFailed
integer
Count of source entries kopia could not read and excluded, making the snapshot incomplete.
format:
int64
filesModified
integer
Count of files changed since the previous snapshot.
format:
int64
filesNew
integer
Count of files new since the previous snapshot.
format:
int64
filesUnchanged
integer
Count of files unchanged since the previous snapshot.
format:
int64
sizeBytes
integer
Total logical size of the snapshot in bytes.
format:
int64timing object
Start/end/duration of the snapshot run.
durationSeconds
integer
Wall-clock duration in seconds.
format:
int64
endTime
string
RFC3339 end time of the run.
startTime
string
RFC3339 start time of the run.
No matches. Try .spec.deletionPolicy for an exact path