actions

package
v0.15.0-victorialogs Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 23 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 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 BackupMetadata added in v1.91.0

type BackupMetadata struct {
	CreatedAt   string `json:"created_at"`
	CompletedAt string `json:"completed_at"`
}

BackupMetadata contains metadata about the backup. Note that CreatedAt and CompletedAt are in RFC3339 format.

type RemoteBackupCopy added in v1.94.0

type RemoteBackupCopy struct {
	// Concurrency is the number of concurrent workers during the backup.
	Concurrency int

	// Src is the copy source
	Src common.RemoteFS

	// Dst is the copy destination.
	//
	// If dst contains the previous backup data, then dst is updated incrementally,
	// i.e. only the changed data is copied.
	//
	// If dst points to empty dir, then full copy is made.
	Dst common.RemoteFS
}

RemoteBackupCopy copies backup from Src to Dst.

func (*RemoteBackupCopy) Run added in v1.94.0

func (b *RemoteBackupCopy) Run() error

Run runs copy with the provided settings.

type Restore

type Restore struct {
	// Concurrency is the number of concurrent workers to run during restore.
	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