backup

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package backup runs filesystem backups from the agent into Proxmox Backup Server with gopbs, over a session the FallBCK server opened on the agent's behalf.

Index

Constants

View Source
const DefaultArchiveName = "root"

DefaultArchiveName is used for jobs with more than one backup path

Variables

This section is empty.

Functions

func ArchiveEntryNames added in v0.6.0

func ArchiveEntryNames(paths []string) (map[string]string, error)

ArchiveEntryNames decides how each backup path is named at the top of the archive when a job has several roots. Paths keep their basename (`/etc` → `etc`); when two paths share a basename, both are named after their full path with `/` replaced by `-` (`/etc/mydir` → `etc-mydir`, `/var/lib/mydir` → `var-lib-mydir`).

func Run added in v0.6.0

Run executes the backup and maps the outcome to a BackupExecutionResult

Types

type DirectOptions added in v0.6.0

type DirectOptions struct {
	Endpoint    string
	Fingerprint string
	TLSVerify   bool
	// Namespace within the datastore (configured on the target by an administrator);
	// empty means the root namespace
	Namespace string
	// APIToken in canonical user@realm!tokenid:secret form
	APIToken string
}

DirectOptions connects the agent straight to PBS (job setting direct_pbs)

type Options added in v0.6.0

type Options struct {
	// Session carries the snapshot identity, format and paths from the server
	Session *temporal.BackupSessionInfo
	// Dial returns a connection on which the PBS backup session is already open
	// (proxy.Dial through the FallBCK server). Ignored when Direct is set.
	Dial func(ctx context.Context, ref pbs.SnapshotRef) (net.Conn, error)
	// Direct, when set, makes gopbs connect to PBS itself with these credentials
	Direct *DirectOptions
	// Workers is the number of concurrent chunk uploads (0 = gopbs default)
	Workers int
	// ArchiveName names the pxar archive inside the snapshot (default: gopbs default)
	ArchiveName string
	// Blobs are small extra files stored in the snapshot as <name>.blob (manifests)
	Blobs []gopbs.Blob
	// OnPhase is told what the engine is doing (opening the session, uploading an
	// archive, finalizing); used for activity heartbeats and failure reporting
	OnPhase func(phase string)
}

Options for one backup run

Jump to

Keyboard shortcuts

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