Documentation
¶
Overview ¶
Package backuplifecycle owns the local, owner-authorized backup lifecycle journal while delegating repository mechanics to a narrow runtime boundary.
Index ¶
- Constants
- func ReadEmergencyIdentities(filename string) ([]age.Identity, error)
- func RepositoryConfigurationDigest(configuration RepositoryConfiguration) string
- func RepositoryRestoreRequestDigest(request RepositoryRestoreRequest) string
- func RepositorySnapshotRequestDigest(request RepositorySnapshotRequest) string
- func RestoreResultEvidenceRef(resultID string) (string, error)
- func RestoreStagingPath(operationID string) string
- func SnapshotAnchorEvidenceRef(anchorID string) (string, error)
- func VerifyRestoreAbandonment(workspaceRoot string, abandonment RestoreAbandonment) error
- func VerifyRestoreRecoveryAnchor(workspaceRoot string, recovery RestoreRecoveryAnchor) error
- func VerifyRestoreResult(workspaceRoot string, result RestoreResult) error
- func VerifySnapshotAnchor(workspaceRoot string, anchor SnapshotAnchor) error
- type AuthorityLineage
- type BackupCoverage
- type Configuration
- type ConfigureInput
- type Consistency
- type Creator
- type EmergencyContractInput
- type EmergencyEntry
- type EmergencyExportInput
- type EmergencyExportResult
- type EmergencyManifest
- type EmergencyRestoreInput
- type EmergencyRestoreResult
- type EmergencySource
- type EvidenceAge
- type History
- type Policy
- type RecoveryObjectiveAssessment
- type RecoveryObjectiveCheck
- type RepositoryConfiguration
- type RepositoryReceipt
- type RepositoryRestoreReceipt
- type RepositoryRestoreRequest
- type RepositoryRuntime
- type RepositoryScope
- type RepositorySnapshotReceipt
- type RepositorySnapshotRequest
- type RepositoryStatus
- type RestoreAbandonInput
- type RestoreAbandonment
- type RestoreInput
- type RestorePostVerifier
- type RestoreRecoveryAnchor
- type RestoreResult
- type RestoreVerification
- type RestoreVerificationRequest
- type RunInput
- type Service
- func (s *Service) AbandonRestore(ctx context.Context, input RestoreAbandonInput) (RestoreAbandonment, error)
- func (s *Service) Configure(ctx context.Context, input ConfigureInput) (Configuration, error)
- func (s *Service) Restore(ctx context.Context, input RestoreInput) (RestoreResult, error)
- func (s *Service) Run(ctx context.Context, input RunInput) (SnapshotAnchor, error)
- func (s *Service) Status(ctx context.Context, input StatusInput) (RepositoryStatus, error)
- type SnapshotAnchor
- type SnapshotAvailability
- type SnapshotOperationInspection
- type SnapshotQuiesceMount
- type SnapshotQuiesceRuntime
- type SnapshotQuiescedContainer
- type SnapshotQuiescence
- type StatusInput
Constants ¶
const ( EmergencyExportAPI = "stackkit.backup-emergency-export/v2" EmergencyArchive = "stackkit-emergency.tar.gz.age" EmergencyManifestName = "stackkit-emergency-export-manifest.json" )
const EmergencyRestoreRunbook = `` /* 1875-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ReadEmergencyIdentities ¶
ReadEmergencyIdentities keeps recovery secrets out of argv and JSON output.
func RepositoryConfigurationDigest ¶
func RepositoryConfigurationDigest(configuration RepositoryConfiguration) string
RepositoryConfigurationDigest is the canonical digest a runtime must echo in its configuration receipt.
func RepositoryRestoreRequestDigest ¶
func RepositoryRestoreRequestDigest(request RepositoryRestoreRequest) string
RepositoryRestoreRequestDigest is the canonical digest a runtime must echo after full verification and staging of the exact selected snapshot anchor.
func RepositorySnapshotRequestDigest ¶
func RepositorySnapshotRequestDigest(request RepositorySnapshotRequest) string
RepositorySnapshotRequestDigest is the canonical digest a runtime must echo in both lookup and create receipts.
func RestoreResultEvidenceRef ¶
RestoreResultEvidenceRef returns the canonical owner-custody path shared by CLI, MCP, and the State Console lifecycle projection.
func RestoreStagingPath ¶
RestoreStagingPath returns the fixed isolated target for one restore operation. Callers cannot supply an alternate host or container path.
func SnapshotAnchorEvidenceRef ¶
SnapshotAnchorEvidenceRef returns the owner-custody path derived solely from a verified content address. Callers never supply or redirect the path.
func VerifyRestoreAbandonment ¶
func VerifyRestoreAbandonment(workspaceRoot string, abandonment RestoreAbandonment) error
VerifyRestoreAbandonment verifies the content identity and current local Owner signature of one terminal abandonment record.
func VerifyRestoreRecoveryAnchor ¶
func VerifyRestoreRecoveryAnchor(workspaceRoot string, recovery RestoreRecoveryAnchor) error
func VerifyRestoreResult ¶
func VerifyRestoreResult(workspaceRoot string, result RestoreResult) error
func VerifySnapshotAnchor ¶
func VerifySnapshotAnchor(workspaceRoot string, anchor SnapshotAnchor) error
Types ¶
type AuthorityLineage ¶
type AuthorityLineage struct {
Binding generationartifact.PlanBinding `json:"binding"`
ManifestHash string `json:"manifestHash"`
GenerationReceiptHash string `json:"generationReceiptHash"`
ApplyResultHash string `json:"applyResultHash"`
ApplyReceiptHash string `json:"applyReceiptHash"`
OwnerBindingDigest string `json:"ownerBindingDigest"`
PocketIDSubject string `json:"pocketIdSubject"`
}
AuthorityLineage binds backup side effects to the complete verified generation and apply chain, rather than to a plan hash in isolation.
type BackupCoverage ¶
type BackupCoverage struct {
Scope string `json:"scope"`
RecoveryMode string `json:"recoveryMode"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
Target localbackuppolicy.Target `json:"target"`
ManagedVolumeNames []string `json:"managedVolumeNames"`
ApplicationVolumes []localbackuppolicy.ApplicationVolume `json:"applicationVolumes,omitempty"`
ExcludePaths []string `json:"excludePaths"`
OffHostRecovery string `json:"offHostRecovery"`
ApplicationRecovery string `json:"applicationRecovery"`
}
BackupCoverage describes the selected source policy, not proof that its data is recoverable. Only the owner-bound configuration supplies these facts.
type Configuration ¶
type Configuration struct {
APIVersion string `json:"apiVersion"`
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
OperationID string `json:"operationId"`
Policy Policy `json:"policy"`
Repository RepositoryReceipt `json:"repository"`
}
type ConfigureInput ¶
type ConfigureInput struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifact []byte `json:"-"`
}
type Consistency ¶
type Consistency string
const ConsistencyCrashConsistent Consistency = "crash-consistent"
type EmergencyContractInput ¶
type EmergencyContractInput struct {
Plan backupplan.EmergencyExportPlan
Policy localbackuppolicy.Policy
VolumeRoot string
DumpSources []EmergencySource
Sources []EmergencySource
Target string
Recipients []age.Recipient
LargeMediaMode string
}
EmergencyContractInput lowers a generated v2 backup contract into the existing portable exporter. Policy supplies the CUE-selected volume set; the recovery plan supplies format, classes, media policy and target.
type EmergencyEntry ¶
type EmergencyExportInput ¶
type EmergencyExportInput struct {
Target string
Sources []EmergencySource
Recipients []age.Recipient
LargeMediaMode string
}
type EmergencyExportResult ¶
type EmergencyExportResult struct {
APIVersion string `json:"apiVersion"`
Archive string `json:"archive"`
ArchiveSHA256 string `json:"archiveSHA256"`
Manifest EmergencyManifest `json:"manifest"`
}
func ExportEmergency ¶
func ExportEmergency(ctx context.Context, input EmergencyExportInput) (EmergencyExportResult, error)
ExportEmergency writes encrypted tar/gzip bytes through the existing local backup owner. No Kopia repository, Docker daemon or hosted account is needed. Only a complete export is installed at Target; existing targets are preserved.
func ExportFromContract ¶
func ExportFromContract(ctx context.Context, input EmergencyContractInput) (EmergencyExportResult, error)
ExportFromContract streams the generated v2 backup contract through the existing encrypted portable exporter. It does not activate applications or prove a live restore.
type EmergencyManifest ¶
type EmergencyManifest struct {
APIVersion string `json:"apiVersion"`
CreatedAt time.Time `json:"createdAt"`
Consistency string `json:"consistency"`
LargeMediaMode string `json:"largeMediaMode"`
Sources []EmergencySource `json:"sources"`
Entries []EmergencyEntry `json:"entries"`
ApplicationsVerified bool `json:"applicationsVerified"`
}
EmergencyManifest describes bytes actually archived, not a requested backup policy. Copying live files is never an application consistency/restore proof.
type EmergencyRestoreInput ¶
type EmergencyRestoreResult ¶
type EmergencyRestoreResult struct {
APIVersion string `json:"apiVersion"`
Target string `json:"target"`
ContentVerified bool `json:"contentVerified"`
ApplicationsVerified bool `json:"applicationsVerified"`
Manifest EmergencyManifest `json:"manifest"`
}
func RestoreEmergency ¶
func RestoreEmergency(ctx context.Context, input EmergencyRestoreInput) (EmergencyRestoreResult, error)
RestoreEmergency only stages data into a new directory. It requires the private age identity, not old owner custody or access to the failed server. Authentication or checksum failures discard the task-owned staging tree.
type EmergencySource ¶
type EmergencySource struct {
Path string `json:"path"`
Class string `json:"class"`
ArchivePath string `json:"archivePath"`
Coverage string `json:"coverage"`
}
EmergencySource is an explicit owner-selected local source. Media omitted by policy remains in the manifest so missing bytes cannot look protected.
func SourcesFromContract ¶
func SourcesFromContract(plan backupplan.EmergencyExportPlan, policy localbackuppolicy.Policy, volumeRoot string, dumps []EmergencySource) ([]EmergencySource, error)
SourcesFromContract maps the generated local Kopia source policy onto explicit emergency-export sources. Missing include classes omit those volumes; secret volumes are skipped unless secrets are selected. Dump sources replace live volumes of the same class so a hook-produced dump is archived instead of a running database file.
type EvidenceAge ¶
type EvidenceAge struct {
State string `json:"state"`
EvidenceID string `json:"evidenceId,omitempty"`
PlanHash string `json:"planHash,omitempty"`
CurrentPlan bool `json:"currentPlan"`
RecordedAt *time.Time `json:"recordedAt,omitempty"`
CaptureStartedAt *time.Time `json:"captureStartedAt,omitempty"`
AgeSeconds *int64 `json:"ageSeconds,omitempty"`
}
type History ¶
type History struct {
ObservedAt time.Time `json:"observedAt"`
Scope string `json:"scope"`
Issue string `json:"issue,omitempty"`
Snapshot EvidenceAge `json:"snapshot"`
StagedRestore EvidenceAge `json:"stagedRestore"`
Availability *SnapshotAvailability `json:"availability,omitempty"`
RecoveryObjectives []RecoveryObjectiveAssessment `json:"recoveryObjectives,omitempty"`
}
History reports owner-authenticated receipts for the current source policy. Availability separately observes the latest current-authority snapshot manifest. Neither observation proves complete blob integrity, successful application activation, or compliance with a recovery-time objective.
type Policy ¶
type Policy = localbackuppolicy.Policy
Policy is the shared strict renderer-to-lifecycle contract.
type RecoveryObjectiveAssessment ¶
type RecoveryObjectiveAssessment struct {
BindingRef string `json:"bindingRef"`
WorkloadRefs []string `json:"workloadRefs"`
DataLoss RecoveryObjectiveCheck `json:"dataLoss"`
RecoveryTime RecoveryObjectiveCheck `json:"recoveryTime"`
}
RecoveryObjectiveAssessment derives current observations from one governed target-local objective. It is not persisted and cannot authorize operations.
type RecoveryObjectiveCheck ¶
type RepositoryConfiguration ¶
type RepositoryReceipt ¶
type RepositoryRestoreReceipt ¶
type RepositoryRestoreReceipt struct {
APIVersion string `json:"apiVersion"`
RepositoryID string `json:"repositoryId"`
SnapshotID string `json:"snapshotId"`
OperationID string `json:"operationId"`
RequestDigest string `json:"requestDigest"`
StagingPath string `json:"stagingPath"`
SnapshotContentDigest string `json:"snapshotContentDigest"`
RepositoryContentVerified bool `json:"repositoryContentVerified"`
CompletedAt time.Time `json:"completedAt"`
}
type RepositoryRestoreRequest ¶
type RepositoryRestoreRequest struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
AuthorizationLineage AuthorityLineage `json:"authorizationLineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
RepositoryID string `json:"repositoryId"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
SnapshotSourceDigest string `json:"snapshotSourceDigest"`
SnapshotRequest RepositorySnapshotRequest `json:"snapshotRequest"`
SnapshotReceipt RepositorySnapshotReceipt `json:"snapshotReceipt"`
OperationID string `json:"operationId"`
StagingPath string `json:"stagingPath"`
}
type RepositoryRuntime ¶
type RepositoryRuntime interface {
Configure(context.Context, RepositoryConfiguration) (RepositoryReceipt, error)
Status(context.Context, RepositoryScope) (RepositoryStatus, error)
LookupSnapshot(context.Context, RepositorySnapshotRequest) (RepositorySnapshotReceipt, bool, error)
CreateSnapshot(context.Context, RepositorySnapshotRequest) (RepositorySnapshotReceipt, error)
RestoreSnapshot(context.Context, RepositoryRestoreRequest) (RepositoryRestoreReceipt, error)
}
RepositoryRuntime owns repository-specific side effects. LookupSnapshot must return a receipt only for the exact request digest, allowing a pending journal to recover after repository success without duplicating a snapshot.
type RepositoryScope ¶
type RepositoryScope struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
RepositoryID string `json:"repositoryId"`
Lineage AuthorityLineage `json:"lineage"`
}
type RepositorySnapshotReceipt ¶
type RepositorySnapshotReceipt struct {
APIVersion string `json:"apiVersion"`
RepositoryID string `json:"repositoryId"`
SnapshotID string `json:"snapshotId"`
OperationID string `json:"operationId"`
RequestDigest string `json:"requestDigest"`
ContentDigest string `json:"contentDigest"`
Consistency Consistency `json:"consistency"`
CreatedAt time.Time `json:"createdAt"`
}
type RepositorySnapshotRequest ¶
type RepositorySnapshotRequest struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
RepositoryID string `json:"repositoryId"`
OperationID string `json:"operationId"`
Source string `json:"source"`
Excludes []string `json:"excludes"`
Consistency Consistency `json:"consistency"`
ProtectRecovery bool `json:"protectRecovery,omitempty"`
}
type RepositoryStatus ¶
type RepositoryStatus struct {
RepositoryID string `json:"repositoryId"`
Ready bool `json:"ready"`
Consistency Consistency `json:"consistency"`
History *History `json:"history,omitempty"`
Coverage *BackupCoverage `json:"coverage,omitempty"`
}
type RestoreAbandonInput ¶
type RestoreAbandonInput struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifact []byte `json:"-"`
OperationID string `json:"operationId"`
OwnerApproved bool `json:"ownerApproved"`
}
RestoreAbandonInput authorizes closing one exact pending or staged restore journal without invoking the repository runtime or touching live volumes.
type RestoreAbandonment ¶
type RestoreAbandonment struct {
APIVersion string `json:"apiVersion"`
ID string `json:"id"`
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
AuthorizationLineage AuthorityLineage `json:"authorizationLineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
RecoveryAnchorID string `json:"recoveryAnchorId"`
OperationID string `json:"operationId"`
ApprovalMethod string `json:"approvalMethod"`
AbandonedAt time.Time `json:"abandonedAt"`
Signature localevidence.OwnerRestoreAbandonmentSignature `json:"signature"`
}
RestoreAbandonment is terminal evidence for an explicitly owner-approved abandonment of one historical restore operation. The recovery anchor and any staged receipt remain in the operation journal unchanged.
type RestoreInput ¶
type RestoreInput struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifact []byte `json:"-"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
OperationID string `json:"operationId"`
OwnerApproved bool `json:"ownerApproved"`
PostVerify RestorePostVerifier `json:"-"`
}
type RestorePostVerifier ¶
type RestorePostVerifier func(context.Context, RestoreVerificationRequest) (RestoreVerification, error)
type RestoreRecoveryAnchor ¶
type RestoreRecoveryAnchor struct {
APIVersion string `json:"apiVersion"`
ID string `json:"id"`
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
AuthorizationLineage AuthorityLineage `json:"authorizationLineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
SnapshotLineage AuthorityLineage `json:"snapshotLineage"`
RepositoryID string `json:"repositoryId"`
SnapshotID string `json:"snapshotId"`
SnapshotContentDigest string `json:"snapshotContentDigest"`
OperationID string `json:"operationId"`
StagingPath string `json:"stagingPath"`
Mode string `json:"mode"`
ApprovalMethod string `json:"approvalMethod"`
ApprovedAt time.Time `json:"approvedAt"`
ExpiresAt time.Time `json:"expiresAt"`
Signature localevidence.OwnerRestoreRecoverySignature `json:"signature"`
}
type RestoreResult ¶
type RestoreResult struct {
APIVersion string `json:"apiVersion"`
ID string `json:"id"`
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
AuthorizationLineage AuthorityLineage `json:"authorizationLineage"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
SnapshotLineage AuthorityLineage `json:"snapshotLineage"`
OperationID string `json:"operationId"`
RecoveryAnchor RestoreRecoveryAnchor `json:"recoveryAnchor"`
Request RepositoryRestoreRequest `json:"request"`
Receipt RepositoryRestoreReceipt `json:"receipt"`
Verification RestoreVerification `json:"verification"`
Signature localevidence.OwnerRestoreResultSignature `json:"signature"`
}
func LoadRestoreResult ¶
func LoadRestoreResult(workspaceRoot, resultID string) (RestoreResult, error)
LoadRestoreResult loads one content-addressed staged restore result and verifies its complete owner-signed recovery chain before returning it. Callers cannot select a path: resultID alone derives the confined location.
type RestoreVerification ¶
type RestoreVerification struct {
APIVersion string `json:"apiVersion"`
OwnerRef string `json:"ownerRef"`
OwnerBindingDigest string `json:"ownerBindingDigest"`
PocketIDSubject string `json:"pocketIdSubject"`
PlanHash string `json:"planHash"`
ServicesVerified bool `json:"servicesVerified"`
VerifiedAt time.Time `json:"verifiedAt"`
}
type RestoreVerificationRequest ¶
type RestoreVerificationRequest struct {
OwnerRef string `json:"ownerRef"`
AuthorizationLineage AuthorityLineage `json:"authorizationLineage"`
SnapshotAnchorID string `json:"snapshotAnchorId"`
OperationID string `json:"operationId"`
StagingPath string `json:"stagingPath"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AbandonRestore ¶
func (s *Service) AbandonRestore(ctx context.Context, input RestoreAbandonInput) (RestoreAbandonment, error)
AbandonRestore closes one exact pending or staged restore operation. It is deliberately independent of source-topology compatibility and recovery expiry: those properties govern whether a restore may run, not whether its retained journal may be explicitly released by the current Owner.
func (*Service) Configure ¶
func (s *Service) Configure(ctx context.Context, input ConfigureInput) (Configuration, error)
func (*Service) Restore ¶
func (s *Service) Restore(ctx context.Context, input RestoreInput) (RestoreResult, error)
Restore verifies one owner-signed snapshot anchor, stages its complete contents below the governed isolated restore volume, and signs evidence only after the caller re-verifies the current local Plan/Apply/Owner/service closure. It deliberately does not mutate live Docker volumes.
func (*Service) Status ¶
func (s *Service) Status(ctx context.Context, input StatusInput) (RepositoryStatus, error)
type SnapshotAnchor ¶
type SnapshotAnchor struct {
APIVersion string `json:"apiVersion"`
ID string `json:"id"`
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifactDigest string `json:"policyArtifactDigest"`
OperationID string `json:"operationId"`
Policy Policy `json:"policy"`
Repository RepositoryReceipt `json:"repository"`
Snapshot RepositorySnapshotReceipt `json:"snapshot"`
Quiescence *SnapshotQuiescence `json:"quiescence,omitempty"`
Signature localevidence.OwnerSnapshotAnchorSignature `json:"signature"`
ProtectRecovery bool `json:"protectRecovery,omitempty"`
}
func LoadSnapshotAnchor ¶
func LoadSnapshotAnchor(workspaceRoot, anchorID string) (SnapshotAnchor, error)
LoadSnapshotAnchor reads and verifies the exact persisted content-addressed anchor consumed by restore. It has no repository or restore side effects.
type SnapshotAvailability ¶
type SnapshotAvailability struct {
State string `json:"state"`
Reason string `json:"reason,omitempty"`
Scope string `json:"scope"`
ObservedAt time.Time `json:"observedAt"`
EvidenceID string `json:"evidenceId,omitempty"`
SnapshotID string `json:"snapshotId,omitempty"`
}
SnapshotAvailability is a fresh read-only observation, never an additional durable authority. Present means the exact signed snapshot manifest is still readable in the currently authorized repository; it is not a restore or full content-integrity result.
type SnapshotOperationInspection ¶
type SnapshotOperationInspection struct {
Found bool
OperationID string
State string
OwnerRef string
AuthorityRef string
Lineage AuthorityLineage
PolicyArtifactDigest string
QuiescencePhase string
QuiescenceAuthenticated bool
SnapshotAnchorID string
SnapshotAnchorVerified bool
}
SnapshotOperationInspection is a read-only, owner-authenticated view of a snapshot operation journal. It deliberately contains no runtime handle and cannot resume, settle, or mutate the operation.
func InspectSnapshotOperation ¶
func InspectSnapshotOperation(workspaceRoot, operationID string) (SnapshotOperationInspection, error)
InspectSnapshotOperation reads and authenticates one operation journal. A missing journal is returned as Found=false; malformed, tampered, or internally inconsistent journals fail closed. Found=false only proves that no durable journal is currently present; it does not prove that no earlier runtime effect occurred. The inspection is safe to use while the repository runtime is unavailable.
func (SnapshotOperationInspection) SafeForAuthorityReplacement ¶
func (inspection SnapshotOperationInspection) SafeForAuthorityReplacement() bool
SafeForAuthorityReplacement reports whether no writer or unresolved snapshot mutation remains in the inspected journal. A missing journal is safe for replacement decisions because no durable journal is present; it is not proof that no transient runtime effect occurred before it disappeared.
type SnapshotQuiesceMount ¶
type SnapshotQuiesceRuntime ¶
type SnapshotQuiesceRuntime interface {
CreateSnapshotWithQuiescence(
context.Context,
RepositorySnapshotRequest,
SnapshotQuiescence,
func(SnapshotQuiescence) error,
) (RepositorySnapshotReceipt, error)
}
SnapshotQuiesceRuntime is an optional extension for productive runtimes that can stop and restore Docker writers around one Kopia snapshot. Keeping it optional preserves legacy repository fakes and v1 journals.
type SnapshotQuiescedContainer ¶
type SnapshotQuiescedContainer struct {
ID string `json:"id"`
Name string `json:"name"`
WasRunning bool `json:"wasRunning"`
WorkloadRef string `json:"workloadRef,omitempty"`
SiteRef string `json:"siteRef,omitempty"`
NodeRef string `json:"nodeRef,omitempty"`
ComposeProject string `json:"composeProject,omitempty"`
ComposeService string `json:"composeService,omitempty"`
ComponentRef string `json:"componentRef,omitempty"`
Image string `json:"image,omitempty"`
StopOrder int `json:"stopOrder,omitempty"`
Mounts []SnapshotQuiesceMount `json:"mounts"`
}
type SnapshotQuiescence ¶
type SnapshotQuiescence struct {
Phase string `json:"phase"`
GraphDigest string `json:"graphDigest,omitempty"`
CaptureStartedAt *time.Time `json:"captureStartedAt,omitempty"`
Containers []SnapshotQuiescedContainer `json:"containers"`
}
SnapshotQuiescence is the journaled pre-snapshot Docker identity set. The operation journal persists this value before the first stop mutation so a retry can address only the exact containers that were running at capture time. CaptureStartedAt, when present, precedes the first writer stop and provides a conservative age boundary, not application-consistency evidence.
type StatusInput ¶
type StatusInput struct {
OwnerRef string `json:"ownerRef"`
AuthorityRef string `json:"authorityRef"`
Lineage AuthorityLineage `json:"lineage"`
PolicyArtifact []byte `json:"-"`
}