rundetail

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package rundetail holds the type-specific detail blob stored per backup run (backup_runs.details) and rendered on the run detail page. Every blob carries a top-level Type discriminator; the rest is type-specific.

Index

Constants

View Source
const (
	TypeFilesystem = "filesystem"
	TypeDatabase   = "database"
	TypeKubernetes = "kubernetes"
	TypePVE        = "pve"
	TypeDocker     = "docker"
	TypeM365       = "m365"
)

Types

Variables

This section is empty.

Functions

func Marshal

func Marshal(v any) json.RawMessage

Marshal renders a detail value as compact JSON (json.RawMessage for the run)

func WrapManifest

func WrapManifest(detailType string, manifest []byte) json.RawMessage

WrapManifest tags a marshalled manifest with its detail type

Types

type ArchiveStat

type ArchiveStat struct {
	Name         string  `json:"name"`
	Kind         string  `json:"kind,omitempty"` // pxar | payload | catalog
	SizeBytes    uint64  `json:"size_bytes"`
	Chunks       uint64  `json:"chunks"`
	NewChunks    uint64  `json:"new_chunks"`
	ReusedChunks uint64  `json:"reused_chunks"`
	Dedup        float64 `json:"dedup,omitempty"`
}

ArchiveStat is one pxar/catalog/payload archive uploaded in a snapshot

type Filesystem

type Filesystem struct {
	Type         string        `json:"type"` // filesystem
	Format       string        `json:"format,omitempty"`
	SnapshotID   string        `json:"snapshot_id,omitempty"`
	Paths        []string      `json:"paths,omitempty"`
	ExcludePaths []string      `json:"exclude_paths,omitempty"`
	Archives     []ArchiveStat `json:"archives,omitempty"`
	Warnings     []Warning     `json:"warnings,omitempty"`
	// Reuse reports metadata change detection (v2 archives with a metadata cache)
	Reuse *ReuseStats `json:"reuse,omitempty"`
}

Filesystem is the detail blob for a filesystem backup

type Progress

type Progress struct {
	// Phase is the current human-readable step (e.g. "uploading db/data (40s)")
	Phase string `json:"phase,omitempty"`
	// Items are per-unit statuses keyed by a stable id (PVC group, database name)
	Items map[string]ProgressItem `json:"items,omitempty"`
	// Counts summarise the items for a quick "3/8" headline
	UpdatedAt string `json:"updated_at,omitempty"`
}

Progress is the live state of a running backup, updated mid-run and polled by the detail page. It is cleared conceptually once the run finalizes (the page then shows the full Details blob instead).

type ProgressItem

type ProgressItem struct {
	Name string `json:"name"`
	// Status: pending | running | completed | failed | skipped
	Status        string `json:"status"`
	Kind          string `json:"kind,omitempty"` // pvc | database
	Mode          string `json:"mode,omitempty"`
	Consistency   string `json:"consistency,omitempty"`
	BytesUploaded int64  `json:"bytes_uploaded,omitempty"`
	SnapshotID    string `json:"snapshot_id,omitempty"`
	Note          string `json:"note,omitempty"`
	Error         string `json:"error,omitempty"`
}

ProgressItem is one live per-unit status (a PVC, a database)

type ReuseStats added in v0.9.5

type ReuseStats struct {
	Files         int    `json:"files"`
	ReusedFiles   int    `json:"reused_files"`
	ReusedBytes   uint64 `json:"reused_bytes"`
	InjectedBytes uint64 `json:"injected_bytes"`
	RejectedRuns  int    `json:"rejected_runs,omitempty"`
}

ReuseStats is what metadata change detection achieved in one run

type Warning

type Warning struct {
	Path    string `json:"path,omitempty"`
	Message string `json:"message"`
}

Warning mirrors an archiver warning (path + message)

type Wrapper

type Wrapper struct {
	Type     string          `json:"type"`
	Manifest json.RawMessage `json:"manifest,omitempty"`
}

Wrapper carries a manifest-style blob (database / kubernetes) with a Type tag, so the detail page can switch on Type and render the manifest.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL