history

package
v0.0.0-...-f20d259 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	BackupStatusInProgress = "In Progress"
	BackupStatusSucceed    = "Success"
	BackupStatusFailed     = "Failure"
)

Variables

This section is empty.

Functions

func CurrentTimestamp

func CurrentTimestamp() string

func InitializeHistoryDatabase

func InitializeHistoryDatabase(historyDBPath string) (*sql.DB, error)

func StoreBackupHistory

func StoreBackupHistory(db *sql.DB, 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 GetBackupConfig

func GetBackupConfig(timestamp string, historyDB *sql.DB) (*BackupConfig, error)

func GetMainBackupInfo

func GetMainBackupInfo(timestamp string, historyDB *sql.DB) (BackupConfig, error)

func ReadConfigFile

func ReadConfigFile(filename string) *BackupConfig

func (*BackupConfig) Failed

func (backup *BackupConfig) Failed() bool

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