Documentation
¶
Overview ¶
Package local stores backup bundles on a filesystem path.
The v1 backup destination (R-217). Honest about what it is: a bundle beside the install it backs up does not survive the disk failing, and R-217 says so plainly. It exists because a DR path that only works once a remote destination is configured is a DR path nobody tests, and because "recover from a recent mistake" (R-210) is served perfectly well by local disk.
Retention is Pando's here: a filesystem has no lifecycle rules, so OwnsRetention is false and core prunes (R-211).
Index ¶
- Constants
- func Info() api.KindInfo
- type Adapter
- func (a *Adapter) Capabilities() api.BackupCapabilities
- func (a *Adapter) Category() api.Category
- func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error
- func (a *Adapter) Delete(_ context.Context, name string) error
- func (a *Adapter) HealthCheck(_ context.Context) error
- func (a *Adapter) Kind() string
- func (a *Adapter) List(_ context.Context) ([]api.StoredBundle, error)
- func (a *Adapter) Reader(_ context.Context, name string) (io.ReadCloser, error)
- func (a *Adapter) Writer(_ context.Context, name string) (io.WriteCloser, error)
Constants ¶
const Kind = "local"
Kind is the adapter kind.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter writes bundles into a directory.
func (*Adapter) Capabilities ¶
func (a *Adapter) Capabilities() api.BackupCapabilities
Capabilities: a filesystem expires nothing on its own.
func (*Adapter) HealthCheck ¶
HealthCheck writes and removes a probe file.
Not a stat: a directory that exists and is not writable is the failure this needs to catch, and it must be caught before the disaster rather than during it. A read-only mount reports healthy to every check that only looks.
func (*Adapter) Writer ¶
Writer creates a bundle, written to a temporary name and renamed on Close.
Atomic because a half-written bundle that looks whole is exactly the failure R-215 exists to catch, and catching it at restore time is catching it too late. A crash mid-write leaves a .partial file, which List ignores.