history

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupStatusSucceed = "Success"
	BackupStatusFailed  = "Failure"
)

Variables

This section is empty.

Functions

func CurrentTimestamp

func CurrentTimestamp() string

func LockHistoryFile

func LockHistoryFile() lockfile.Lockfile

func WriteBackupHistory

func WriteBackupHistory(historyFilePath string, currentBackupConfig *BackupConfig) error

func WriteConfigFile

func WriteConfigFile(config *BackupConfig, configFilename string)

Types

type BackupConfig

type BackupConfig struct {
	BackupDir             string
	BackupVersion         string
	Compressed            bool
	CompressionType       string
	DatabaseName          string
	DatabaseVersion       string
	SegmentCount          int
	DataOnly              bool
	DateDeleted           string
	ExcludeRelations      []string
	ExcludeSchemaFiltered bool
	ExcludeSchemas        []string
	ExcludeTableFiltered  bool
	IncludeRelations      []string
	IncludeSchemaFiltered bool
	IncludeSchemas        []string
	IncludeTableFiltered  bool
	Incremental           bool
	LeafPartitionData     bool
	MetadataOnly          bool
	Plugin                string
	PluginVersion         string
	RestorePlan           []RestorePlanEntry
	SingleDataFile        bool
	Timestamp             string
	EndTime               string
	WithoutGlobals        bool
	WithStatistics        bool
	Status                string
}

func ReadConfigFile

func ReadConfigFile(filename string) *BackupConfig

func (*BackupConfig) Failed

func (backup *BackupConfig) Failed() bool

type History

type History struct {
	BackupConfigs []BackupConfig
}

func NewHistory

func NewHistory(filename string) (*History, [32]byte, error)

func (*History) AddBackupConfig

func (history *History) AddBackupConfig(backupConfig *BackupConfig)

func (*History) FindBackupConfig

func (history *History) FindBackupConfig(timestamp string) *BackupConfig

func (*History) RewriteHistoryFile

func (history *History) RewriteHistoryFile(historyFilePath string) error

func (*History) WriteToFileAndMakeReadOnly

func (history *History) WriteToFileAndMakeReadOnly(filename string) error

type RestorePlanEntry

type RestorePlanEntry struct {
	Timestamp string
	TableFQNs []string
}

Jump to

Keyboard shortcuts

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