Expand description
Recorded snapshot metadata — the kopiur-meta kopia tag.
Every produced backup records the mover identity it ran as (uid/gid/fsGroup
plus its provenance) as a compact JSON value under the KOPIUR_META_TAG
snapshot tag, so a later restore — possibly on a rebuilt cluster where the
workload no longer exists — can reproduce the identity the data expects.
The catalog scan decodes the tag back into Snapshot.status.recorded.
§Schema write policy
Writers emit the lowest schema number that represents the data
(KOPIUR_META_SCHEMA_V1 today); the schema is bumped only for a semantic
change an old reader would misinterpret, never for additive fields (readers
accept unknown JSON fields). An older operator reading a newer schema
degrades to recorded-absent (MetaTagDecode::UnsupportedSchema) — it never
errors. This matters for shared-repository multi-cluster topologies running
mixed operator versions.
§Decode is graceful, always
decode_meta_tag never returns an error and never panics: the tag value is
repository data, writable by anyone holding repository credentials (a foreign
cluster, a NAS admin, a compromised replication peer). A malformed value must
degrade to MetaTagDecode::Malformed — one aggregated per-scan count, never
a poisoned catalog scan or a per-entry log line a foreign writer could
amplify.
Structs§
- Recorded
Snapshot Meta - The mover identity recorded on a kopia snapshot at backup time — the decoded
value of the
KOPIUR_META_TAGsnapshot tag.
Enums§
- Meta
TagDecode - What
decode_meta_tagfound in a snapshot’s tags map. Never anErr: a bad tag value is repository data and must degrade, not fail a scan. - Recorded
Src - Where the recorded mover identity came from — which layer of the security-context ladder pinned the effective UID this run recorded.
Constants§
- KOPIUR_
META_ SCHEMA_ V1 - The current (and only)
kopiur-metaschema version. See the module docs for the write policy: writers emit the lowest schema representing the data. - KOPIUR_
META_ TAG - The kopia snapshot-tag key kopiur records its metadata under. Deliberately
colon-free: kopia splits
--tagson the FIRST colon, so a colon-free key is collision-proof against the legacykopiur:config:<name>tag (stored by kopia as manifest keytag:kopiur, valueconfig:<name>) and can never trip kopia’s duplicate-tag-key create failure.
Functions§
- decode_
meta_ tag - Decode the
KOPIUR_META_TAGvalue out of a snapshottagsmap. - encode_
meta_ tag - Encode recorded metadata as the compact single-line JSON value stored under
the
KOPIUR_META_TAGsnapshot tag. - truncate_
utf8 - Truncate
sto at mostmax_bytesbytes on acharboundary (never panics, never splits a multi-byte character). Shared by the catalog’s description cap and the mover’s result-wire bound — foreign-writer-controlled strings must never 4xx a CR create or inflate the result ConfigMap.