systembackup

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubDirectory = "system-backups"

	ConfigFile = "system-backup.cfg"
	ZipFile    = "system-backup.zip"
)

Variables

This section is empty.

Functions

func Delete

func Delete(cfg *Config) error

func Download

func Download(localFilePath string, cfg *Config) error

func GetSystemBackupURL

func GetSystemBackupURL(name, longhornVersion, backupTarget string) (string, error)

func ParseSystemBackupURL

func ParseSystemBackupURL(systemBackupURL string) (backupTarget, version, name string, err error)

ParseSystemBackupURL parse the URL and return backup target, version and name. An example: s3://bucket@region/path/backupstore/system-backups/v1.4.0/sample-system-backup should return s3://bucket@region/path/, v1.4.0, sample-system-backup, nil

func Upload

func Upload(localFilePath string, cfg *Config) error

Types

type Config

type Config struct {
	Name              string
	LonghornVersion   string
	LonghornGitCommit string
	BackupTargetURL   string
	ManagerImage      string
	EngineImage       string
	CreatedAt         time.Time
	Checksum          string
}

func LoadConfig

func LoadConfig(name, longhornVersion, backupTargetURL string) (*Config, error)

type Name

type Name string

type SystemBackups

type SystemBackups map[Name]URI

func List

func List(destURL string) (SystemBackups, error)

type URI

type URI string

Jump to

Keyboard shortcuts

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