backup

package
v0.0.0-...-0ac389e Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package backup handles all the logic around backing up and restoring snapshots

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoOp = errors.New("nothing new to sync")
)

Functions

func AutoRestore

func AutoRestore(pctx context.Context, jobInfo *files.JobInfo) error

AutoRestore will compute which snapshots need to be restored to get to the snapshot provided, or to the latest snapshot of the volume provided nolint:funlen,gocyclo // Difficult to break this up

func Backup

func Backup(pctx context.Context, jobInfo *files.JobInfo) error

Backup will initiate a backup with the provided configuration. nolint:funlen,gocyclo // Difficult to break this up

func Clean

func Clean(pctx context.Context, jobInfo *files.JobInfo, cleanLocal bool) error

Clean will remove files found in the desination that are not found in any of the manifests found locally or in the destination. If cleanLocal is true, then local manifests not found in the destination are ignored and deleted. This function will optionally delete broken backup sets in the destination if the --force flag is provided. nolint:funlen,gocyclo // Difficult to break this up

func List

func List(pctx context.Context, jobInfo *files.JobInfo, startswith string, before, after time.Time) error

List will sync the manifests found in the target destination to the local cache and then read and output the manifest information describing the backup sets found in the target destination. TODO: Group by volume name? nolint:gocyclo // Difficult to break this up

func ProcessSmartOptions

func ProcessSmartOptions(ctx context.Context, jobInfo *files.JobInfo) error

ProcessSmartOptions will compute the snapshots to use nolint:funlen,gocyclo // Difficult to break this up

func Receive

func Receive(pctx context.Context, jobInfo *files.JobInfo) error

Receive will download and restore the backup job described to the Volume target provided. nolint:funlen,gocyclo // Difficult to break this up

Types

This section is empty.

Jump to

Keyboard shortcuts

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