Documentation ¶
Index ¶
- func BackupMeta(folder storage.Folder, name string) (archive.Backup, error)
- func BackupNamesFromBackupTimes(backups []internal.BackupTime) []string
- func BackupNamesFromBackups(backups []archive.Backup) []string
- func GetBackupDetails(folder storage.Folder, backupTime internal.BackupTime) (archive.Backup, error)
- func GetBackupsDetails(folder storage.Folder, backups []internal.BackupTime) ([]archive.Backup, error)
- func GetSettingWithLocalDefault(key string, defaultValue string) string
- func HandleBackupFetch(ctx context.Context, folder storage.Folder, backupName string, ...) error
- func HandleBackupPush(uploader *internal.Uploader, backupCmd *exec.Cmd, ...) error
- func HandleBackupsDelete(backupTimes []internal.BackupTime, folder storage.Folder, opts PurgeSettings) (purge, retain []archive.Backup, err error)
- func HandleDetailedBackupList(folder storage.Folder, pretty bool, json bool)
- func HandlePurge(backupsPath string, setters ...PurgeOption) error
- func LoadBackups(folder storage.Folder, names []string) ([]archive.Backup, error)
- type PurgeOption
- type PurgeSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupMeta ¶ added in v1.1.1
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
BackupNamesFromBackups forms list of backup names from Backups
func GetBackupDetails ¶ added in v0.2.22
func GetBackupsDetails ¶ added in v0.2.22
func GetSettingWithLocalDefault ¶
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 HandleBackupPush ¶ added in v0.2.15
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
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
Types ¶
type PurgeOption ¶ added in v1.1.1
type PurgeOption func(*PurgeSettings)
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
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.