actions

package
v1.39.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteFS

func NewRemoteFS(path string) (common.RemoteFS, error)

NewRemoteFS returns new remote fs from the given path.

Types

type Backup

type Backup struct {
	// Concurrency is the number of concurrent workers during the backup.
	// Concurrency=1 by default.
	Concurrency int

	// Src is backup source
	Src *fslocal.FS

	// Dst is backup destination.
	//
	// If dst contains the previous backup data, then incremental backup
	// is made, i.e. only the changed data is uploaded.
	//
	// If dst points to empty dir, then full backup is made.
	// Origin can be set to the previous backup in order to reduce backup duration
	// and reduce network bandwidth usage.
	Dst common.RemoteFS

	// Origin is optional origin for speeding up full backup if Dst points
	// to empty dir.
	Origin common.OriginFS
}

Backup performs backup according to the provided settings.

Note that the backup works only for VictoriaMetrics snapshots made via `/snapshot/create`. It works improperly on mutable files.

func (*Backup) Run

func (b *Backup) Run() error

Run runs b with the provided settings.

type Restore

type Restore struct {
	// Concurrency is the number of concurrent workers to run during restore.
	// Concurrency=1 is used by default.
	Concurrency int

	// Src is the source containing backed up data.
	Src common.RemoteFS

	// Dst is destination to restore the data.
	//
	// If dst points to existing directory, then incremental restore is performed,
	// i.e. only new data is downloaded from src.
	Dst *fslocal.FS

	// SkipBackupCompleteCheck may be set in order to skip for `backup complete` file in Src.
	//
	// This may be needed for restoring from old backups with missing `backup complete` file.
	SkipBackupCompleteCheck bool
}

Restore restores data according to the provided settings.

Note that the restore works only for VictoriaMetrics backups made from snapshots. It works improperly on mutable files.

func (*Restore) Run

func (r *Restore) Run() error

Run runs r with the provided settings.

Jump to

Keyboard shortcuts

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