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 BackupNamesFromBackupTimes ¶
func BackupNamesFromBackupTimes(backups []internal.BackupTime) []string
BackupNamesFromBackupTimes forms list of backup names from BackupTime
func BackupNamesFromBackups ¶
BackupNamesFromBackups forms list of backup names from Backups
func GetBackupDetails ¶
func GetBackupsDetails ¶
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 ¶
func HandleBackupPush ¶
func HandleBackupsDelete ¶
func HandleBackupsDelete(backupTimes []internal.BackupTime, folder storage.Folder, opts PurgeSettings) (purge, retain []archive.Backup, err error)
HandleBackupsDelete delete backups according to settings
func HandleDetailedBackupList ¶
TODO : unit tests
func HandlePurge ¶
func HandlePurge(backupsPath string, setters ...PurgeOption) error
HandlePurge delete backups and oplog archives according to settings
Types ¶
type PurgeOption ¶
type PurgeOption func(*PurgeSettings)
func PurgeRetainAfter ¶
func PurgeRetainAfter(retainAfter time.Time) PurgeOption
PurgeRetainAfter ...
type PurgeSettings ¶
type PurgeSettings struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.