storage

package
v0.0.0-...-c600a59 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Daily   retentionPeriod = "daily"
	Weekly  retentionPeriod = "weekly"
	Monthly retentionPeriod = "monthly"
)

Variables

View Source
var RetentionPeriodsList = []retentionPeriod{Monthly, Weekly, Daily}

Functions

func GetDescBackupDstAndLinks(tmpBackupFile, ofs, bakPath string, retention Retention) (dst string, links map[string]string, err error)

func GetDescBackupDstList

func GetDescBackupDstList(tmpBackupFile, ofs, bakPath string, retention Retention) (dst []string)
func GetIncBackupDstAndLinks(tmpBackupFile, ofs, bakPath string) (bakDst, mtdDst string, links map[string]string, err error)

func GetIncBackupDstList

func GetIncBackupDstList(tmpBackupFile, ofs, bakPath string) (bakDst, mtdDst []string)

func GetRetention

func GetRetention(p retentionPeriod, r Retention) (retentionCount int, retentionDate time.Time)

func IsNeedToBackup

func IsNeedToBackup(day, week, month int) bool

Types

type Params

type Params struct {
	RateLimit     int64
	BackupPath    string
	RotateEnabled bool
	Retention
}

type Retention

type Retention struct {
	Days     int
	Weeks    int
	Months   int
	UseCount bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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