redis

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupMeta added in v1.1.1

func BackupMeta(folder storage.Folder, name string) (archive.Backup, error)

func BackupNamesFromBackupTimes added in v1.1.1

func BackupNamesFromBackupTimes(backups []internal.BackupTime) []string

BackupNamesFromBackupTimes forms list of backup names from BackupTime

func BackupNamesFromBackups added in v1.1.1

func BackupNamesFromBackups(backups []archive.Backup) []string

BackupNamesFromBackups forms list of backup names from Backups

func GetBackupDetails added in v0.2.22

func GetBackupDetails(folder storage.Folder, backupTime internal.BackupTime) (archive.Backup, error)

func GetBackupsDetails added in v0.2.22

func GetBackupsDetails(folder storage.Folder, backups []internal.BackupTime) ([]archive.Backup, error)

func GetSettingWithLocalDefault

func GetSettingWithLocalDefault(key string, defaultValue string) string

DISCUSS: In some cases, we have default values, but we don't want to store it at global default settings. Naming is far from best, if Go allowed overloads, name GetSettingWithDefault would be more appropriate

func HandleBackupFetch added in v0.2.22

func HandleBackupFetch(ctx context.Context, folder storage.Folder, backupName string, restoreCmd *exec.Cmd) error

func HandleBackupPush added in v0.2.15

func HandleBackupPush(uploader *internal.Uploader, backupCmd *exec.Cmd, metaConstructor internal.MetaConstructor) error

func HandleBackupsDelete added in v1.1.1

func HandleBackupsDelete(backupTimes []internal.BackupTime,
	folder storage.Folder,
	opts PurgeSettings) (purge, retain []archive.Backup, err error)

HandleBackupsDelete delete backups according to settings

func HandleDetailedBackupList added in v0.2.22

func HandleDetailedBackupList(folder storage.Folder, pretty bool, json bool)

TODO : unit tests

func HandlePurge added in v1.1.1

func HandlePurge(backupsPath string, setters ...PurgeOption) error

HandlePurge delete backups and oplog archives according to settings

func LoadBackups added in v1.1.1

func LoadBackups(folder storage.Folder, names []string) ([]archive.Backup, error)

LoadBackups downloads backups metadata

Types

type PurgeOption added in v1.1.1

type PurgeOption func(*PurgeSettings)

func PurgeDryRun added in v1.1.1

func PurgeDryRun(dryRun bool) PurgeOption

PurgeDryRun ...

func PurgeGarbage added in v1.1.1

func PurgeGarbage(purgeGarbage bool) PurgeOption

PurgeGarbage ...

func PurgeRetainAfter added in v1.1.1

func PurgeRetainAfter(retainAfter time.Time) PurgeOption

PurgeRetainAfter ...

func PurgeRetainCount added in v1.1.1

func PurgeRetainCount(retainCount int) PurgeOption

PurgeRetainCount ...

type PurgeSettings added in v1.1.1

type PurgeSettings struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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