Documentation
¶
Overview ¶
Package localbackupruntime adapts the owner-bound local backup lifecycle to the fixed Kopia container runtime without retaining repository secrets.
Index ¶
- Constants
- func RepositoryIDForCoreModule(coreModuleRef string) string
- type Runtime
- func (r *Runtime) BindApplicationTransferClosure(closure []localbackuppolicy.ApplicationRuntime, ...) error
- func (r *Runtime) BindApplicationTransferExport(export func(context.Context) error) error
- func (r *Runtime) BindApplicationTransferHold(id func() string) error
- func (r *Runtime) BindApplicationTransferResume(id string) error
- func (r *Runtime) BindMarketplaceControl(...) error
- func (r *Runtime) Configure(ctx context.Context, configuration backuplifecycle.RepositoryConfiguration) (backuplifecycle.RepositoryReceipt, error)
- func (r *Runtime) CreateSnapshot(ctx context.Context, request backuplifecycle.RepositorySnapshotRequest) (backuplifecycle.RepositorySnapshotReceipt, error)
- func (r *Runtime) CreateSnapshotWithQuiescence(ctx context.Context, request backuplifecycle.RepositorySnapshotRequest, ...) (receipt backuplifecycle.RepositorySnapshotReceipt, resultErr error)
- func (r *Runtime) LookupSnapshot(ctx context.Context, request backuplifecycle.RepositorySnapshotRequest) (backuplifecycle.RepositorySnapshotReceipt, bool, error)
- func (r *Runtime) RestoreSnapshot(ctx context.Context, request backuplifecycle.RepositoryRestoreRequest) (backuplifecycle.RepositoryRestoreReceipt, error)
- func (r *Runtime) Status(ctx context.Context, scope backuplifecycle.RepositoryScope) (backuplifecycle.RepositoryStatus, error)
Constants ¶
const ( RepositoryID = "kopia:local:basement" CloudRepositoryID = "kopia:local:cloud" Backend = "filesystem" )
Variables ¶
This section is empty.
Functions ¶
func RepositoryIDForCoreModule ¶ added in v0.46.8
RepositoryIDForCoreModule names the local Kopia repository that the kit core owning the source policy writes: the Cloud standalone core its own Cloud repository, every Basement core the Basement repository.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime is the production RepositoryRuntime for the CUE-owned local Kopia service. It retains only a confined workspace name and an engine factory.
func New ¶
func New(workspaceRoot string, policy localbackuppolicy.Policy, custody backupexec.ApplicationContainerCustodyVerifier, bindings ...backupexec.ApplicationRuntimeBinding) (*Runtime, error)
New binds all current repository operations to the exact policy already verified through the Plan, artifact and Apply authority chain. Copy through the canonical codec so caller-owned slices cannot change the source selection after the runtime is created.
func NewApplicationSnapshotRuntime ¶ added in v0.54.10
func NewApplicationSnapshotRuntime(workspace string, policy localbackuppolicy.Policy, custody backupexec.ApplicationContainerCustodyVerifier, workloads []string, bindings ...backupexec.ApplicationRuntimeBinding) (*Runtime, error)
NewApplicationSnapshotRuntime uses the existing repository and quiescence journal with an explicit signed selection, never a replacement backup owner.
func (*Runtime) BindApplicationTransferClosure ¶ added in v0.54.10
func (r *Runtime) BindApplicationTransferClosure(closure []localbackuppolicy.ApplicationRuntime, custody backupexec.ApplicationContainerCustodyVerifier) error
BindApplicationTransferClosure keeps data sources scoped to persistent owners while including stateless companions in the same signed writer control journal.
func (*Runtime) BindApplicationTransferExport ¶ added in v0.54.10
BindApplicationTransferExport runs only after the selected writers' stopped state and completed snapshot were persisted by the existing backup journal. Cleanup on failure uses the same exact-container resume and settlement path.
func (*Runtime) BindApplicationTransferHold ¶ added in v0.54.10
func (*Runtime) BindApplicationTransferResume ¶ added in v0.54.10
BindApplicationTransferResume still requires a signed stopped destination outcome in the original snapshot journal before any deferred resume can run.
func (*Runtime) BindMarketplaceControl ¶ added in v0.53.13
func (r *Runtime) BindMarketplaceControl(observe func(context.Context, localbackuppolicy.MarketplaceService) (backupexec.QuiesceContainer, error), control func(localbackuppolicy.MarketplaceService, string) (backuplifecycle.RuntimeControlDriver, error), componentControl func(backuplifecycle.SnapshotQuiescedContainer, string) (backuplifecycle.RuntimeControlDriver, error)) error
BindMarketplaceControl binds only the immutable selection already held by the Plan policy. Discovery cannot widen the snapshot source.
func (*Runtime) Configure ¶
func (r *Runtime) Configure(ctx context.Context, configuration backuplifecycle.RepositoryConfiguration) (backuplifecycle.RepositoryReceipt, error)
func (*Runtime) CreateSnapshot ¶
func (r *Runtime) CreateSnapshot(ctx context.Context, request backuplifecycle.RepositorySnapshotRequest) (backuplifecycle.RepositorySnapshotReceipt, error)
func (*Runtime) CreateSnapshotWithQuiescence ¶
func (r *Runtime) CreateSnapshotWithQuiescence( ctx context.Context, request backuplifecycle.RepositorySnapshotRequest, journal backuplifecycle.SnapshotQuiescence, persist func(backuplifecycle.SnapshotQuiescence) error, ) (receipt backuplifecycle.RepositorySnapshotReceipt, resultErr error)
CreateSnapshotWithQuiescence creates or resumes one native-v2 snapshot while all current writers of governed managed volumes are stopped. The lifecycle callback atomically records the exact identities before the first stop and after each resumable phase in the existing snapshot operation journal.
func (*Runtime) LookupSnapshot ¶
func (r *Runtime) LookupSnapshot(ctx context.Context, request backuplifecycle.RepositorySnapshotRequest) (backuplifecycle.RepositorySnapshotReceipt, bool, error)
func (*Runtime) RestoreSnapshot ¶
func (r *Runtime) RestoreSnapshot( ctx context.Context, request backuplifecycle.RepositoryRestoreRequest, ) (backuplifecycle.RepositoryRestoreReceipt, error)
func (*Runtime) Status ¶
func (r *Runtime) Status(ctx context.Context, scope backuplifecycle.RepositoryScope) (backuplifecycle.RepositoryStatus, error)