backup

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// A time format corresponding to YYYYMMDDHHMM without any separator chars.
	TimeFormat = "200601021504"
)

Variables

This section is empty.

Functions

func Create

func Create(cfg *core.Configuration, reason string) (nowTime time.Time, returnedError error)

Create creates a backup unconditionally. The provided `reason` is used in log messages to explain why the backup was created.

func CreateIfNecessary

func CreateIfNecessary(cfg *core.Configuration) error

CreateIfNecessary creates a backup if the schedule demands it.

func ReadLastBackupTimestamp

func ReadLastBackupTimestamp(cfg *core.Configuration) (time.Time, error)

ReadLastBackupTimestamp reads the "last_backup_timestamp" object in Swift to find when the most recent backup was created.

func WriteLastBackupTimestamp

func WriteLastBackupTimestamp(cfg *core.Configuration, t time.Time) error

WriteLastBackupTimestamp updates the "last_backup_timestamp" object in Swift to indicate that a backup was completed successfully.

Types

This section is empty.

Jump to

Keyboard shortcuts

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