pub struct PolicyArgs {Show 17 fields
pub compression: Option<String>,
pub splitter: Option<String>,
pub ignore: Vec<String>,
pub never_compress: Vec<String>,
pub ignore_cache_dirs: Option<bool>,
pub ignore_file_errors: Option<bool>,
pub ignore_dir_errors: Option<bool>,
pub ignore_unknown_types: Option<bool>,
pub max_parallel_snapshots: Option<u32>,
pub max_parallel_file_reads: Option<u32>,
pub keep_latest: Option<i64>,
pub keep_hourly: Option<i64>,
pub keep_daily: Option<i64>,
pub keep_weekly: Option<i64>,
pub keep_monthly: Option<i64>,
pub keep_annual: Option<i64>,
pub extra_args: Vec<String>,
}Expand description
Policy fields kopia applies via kopia policy set. Mirrors the operator’s
SnapshotPolicy.spec.policy without depending on the api crate, so the kopia
crate stays controller-agnostic. The caller translates the CRD policy into
this and the controller applies it before the first snapshot.
Fields§
§compression: Option<String>--compression algorithm (e.g. zstd, none).
splitter: Option<String>--splitter algorithm.
ignore: Vec<String>--add-ignore glob patterns.
never_compress: Vec<String>--add-never-compress glob patterns.
ignore_cache_dirs: Option<bool>--ignore-cache-dirs tri-state (honor CACHEDIR.TAG). None leaves kopia’s default.
ignore_file_errors: Option<bool>Backup-side error handling (--ignore-file-errors) tri-state. ADR-0005 §13(b).
ignore_dir_errors: Option<bool>--ignore-dir-errors tri-state. ADR-0005 §13(b).
ignore_unknown_types: Option<bool>--ignore-unknown-types tri-state. ADR-0005 §13(b).
max_parallel_snapshots: Option<u32>--max-parallel-snapshots upload parallelism. ADR-0005 §13(f).
max_parallel_file_reads: Option<u32>--max-parallel-file-reads upload parallelism. ADR-0005 §13(f).
keep_latest: Option<i64>--keep-latest: most-recent-N backups to keep per source.
This field (and its five siblings below) exists ONLY so the mover can
pin kopia’s own create-time retention to effectively-infinite at the
identity scope — see kopiur_mover::workspec::KOPIA_KEEP_MAX’s doc
comment for the full hazard. There is deliberately no CRD/workspec
surface that lets a user set these: kopia-side retention stays
forbidden (crates/api/src/error.rs’s InlineRetentionForbidden),
and PolicyArgsSpec::to_kopia never populates them.
keep_hourly: Option<i64>--keep-hourly. See Self::keep_latest.
keep_daily: Option<i64>--keep-daily. See Self::keep_latest.
keep_weekly: Option<i64>--keep-weekly. See Self::keep_latest.
keep_monthly: Option<i64>--keep-monthly. See Self::keep_latest.
keep_annual: Option<i64>--keep-annual. See Self::keep_latest.
extra_args: Vec<String>Verbatim extra policy set flags (the CRD escape hatch).
Trait Implementations§
Source§impl Clone for PolicyArgs
impl Clone for PolicyArgs
Source§fn clone(&self) -> PolicyArgs
fn clone(&self) -> PolicyArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolicyArgs
impl Debug for PolicyArgs
Source§impl Default for PolicyArgs
impl Default for PolicyArgs
Source§fn default() -> PolicyArgs
fn default() -> PolicyArgs
Source§impl PartialEq for PolicyArgs
impl PartialEq for PolicyArgs
Source§fn eq(&self, other: &PolicyArgs) -> bool
fn eq(&self, other: &PolicyArgs) -> bool
self and other values to be equal, and is used by ==.