pub struct Source {
pub pvc: Option<PvcSource>,
pub pvc_selector: Option<PvcSelector>,
pub nfs: Option<NfsVolume>,
pub stream: Option<StreamSource>,
pub read_only: Option<bool>,
pub acknowledge_live_mutation: Option<bool>,
pub source_path_override: Option<String>,
pub source_path_strategy: Option<SourcePathStrategy>,
}Expand description
A single backup source; exactly one of pvc, pvcSelector, nfs, stream
(webhook-enforced).
Fields§
§pvc: Option<PvcSource>Single PVC by name. Mutually exclusive with pvcSelector/nfs.
pvc_selector: Option<PvcSelector>Label/namespace selector matching many PVCs. Mutually exclusive with pvc/nfs.
nfs: Option<NfsVolume>An inline NFS export to back up directly. Mutually exclusive with pvc/pvcSelector/stream.
stream: Option<StreamSource>Capture a command’s standard output as one virtual file — a logical backup
(pg_dumpall, mysqldump, …) rather than a volume copy. Mutually exclusive
with pvc/pvcSelector/nfs. No volume is mounted; the mover execs the
command in a running workload Pod and streams its stdout straight into kopia.
read_only: Option<bool>Mount the source read-only (default true; kopia only ever reads it).
Set false only to make fsGroup work on the source. The kubelet applies
fsGroup by recursively chgrp-ing the volume and adding group-write — and it
skips that walk entirely on a read-only mount, which is why a mover
fsGroup/fsGroupChangePolicy otherwise has no effect here. Under
copyMethod: Snapshot/Clone the walk rewrites the throwaway staged PVC and
never touches your data. Under copyMethod: Direct it rewrites the LIVE volume,
which requires acknowledgeLiveMutation.
Not supported on an nfs source: the kubelet does not apply fsGroup to
in-tree NFS volumes at all, so a read-write mount would grant nothing.
acknowledge_live_mutation: Option<bool>Acknowledges that copyMethod: Direct + readOnly: false lets the kubelet
recursively chgrp the live volume to the mover’s fsGroup and make it
group-writable — permanently, while the workload is running. Required for that
combination alone.
Ignored (not rejected) otherwise: it is an acknowledgement, never harmful to
carry, and rejecting a stale one would make switching copyMethod between
Direct and Snapshot/Clone a two-step edit in both directions.
source_path_override: Option<String>What kopia records as the source path (default /pvc/<name>, or the NFS export path).
On a pvcSelector source this is a footgun. It is ONE literal path, so
it works only while the selector matches exactly one PVC; the moment a
second PVC matches, both would land on that same kopia source, merging
their histories into one stream where they also prune each other, so the
BACKUP is refused at run time and no further snapshots are minted for
that source.
Watch the failed schedule fire, not verification: the earlier snapshots
remain at that path, so verification keeps passing while backups have
stopped. (Verification only fails on a path that never received a
backup.) Prefer sourcePathStrategy, which derives a distinct path per
PVC, or put the override on its own pvc: source.
source_path_strategy: Option<SourcePathStrategy>How a pvcSelector-matched PVC’s source path is derived (pvcName vs pvcNamespacedName).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Source
impl JsonSchema for Source
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more