41 lines
1.8 KiB
Text
41 lines
1.8 KiB
Text
# Backup group contracts — consistency points across multiple components.
|
|
# When services interact (Odoo + PostgreSQL + filestore, mail + LDAP + indexes,
|
|
# etc.) a per-component snapshot can leave inconsistency between members in DR.
|
|
# A BackupGroup declares a coordination window so the manager can produce a
|
|
# consistent cut (à la Chandy-Lamport) across members in the same instant.
|
|
|
|
let bp = import "backup_policy.ncl" in
|
|
let vault = import "vault_refs.ncl" in
|
|
|
|
{
|
|
# Member of a backup group. Either references a whole component policy or
|
|
# a specific scope of that policy.
|
|
GroupMember = {
|
|
component | String | doc "ComponentDef.name",
|
|
scope | String | optional | doc "BackupScope.name; omitted = all scopes",
|
|
},
|
|
|
|
# Coordination strategies. 'best_effort tags members with the same group_id
|
|
# but does not synchronize; 'quiesce_window runs ordered pre-hooks; 'csi_consistent_group
|
|
# delegates atomicity to the CSI driver (requires Longhorn ≥ supported version).
|
|
CoordinationStrategy = {
|
|
kind | [| 'best_effort, 'quiesce_window, 'csi_consistent_group |],
|
|
quiesce_seq | Array String | default = [],
|
|
max_downtime | bp.Duration | optional,
|
|
snapshot_class | String | optional,
|
|
},
|
|
|
|
BackupGroup = {
|
|
name | String | doc "Identifier (used in CLI: --group <name>)",
|
|
members | Array GroupMember
|
|
| doc "Components or scopes participating in the consistent cut",
|
|
schedule | bp.Schedule,
|
|
coordination | CoordinationStrategy,
|
|
retention | bp.RetentionPolicy,
|
|
destinations | Array bp.Destination
|
|
| doc "Same MultiDestinationRequired invariant as BackupPolicy",
|
|
encryption | vault.VaultKeyRef,
|
|
tag_strategy | bp.TagStrategy,
|
|
verify | bp.VerifyPolicyRef | optional,
|
|
},
|
|
}
|