Documentation ¶
Overview ¶
Package catalog is the implementation of a backup catalog
Index ¶
- type BarmanBackup
- type Catalog
- func (catalog *Catalog) FindBackupInfo(recoveryTarget *v1.RecoveryTarget) (*BarmanBackup, error)
- func (catalog *Catalog) FirstRecoverabilityPoint() *time.Time
- func (catalog *Catalog) LatestBackupInfo() *BarmanBackup
- func (catalog *Catalog) Len() int
- func (catalog *Catalog) Less(i, j int) bool
- func (catalog *Catalog) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarmanBackup ¶
type BarmanBackup struct { // The backup label Label string `json:"backup_label"` // The moment where the backup started BeginTimeString string `json:"begin_time"` // The moment where the backup ended EndTimeString string `json:"end_time"` // The moment where the backup ended BeginTime time.Time // The moment where the backup ended EndTime time.Time // The WAL where the backup started BeginWal string `json:"begin_wal"` // The WAL where the backup ended EndWal string `json:"end_wal"` // The LSN where the backup started BeginLSN string `json:"begin_xlog"` // The LSN where the backup ended EndLSN string `json:"end_xlog"` // The systemID of the cluster SystemID string `json:"systemid"` // The ID of the backup ID string `json:"backup_id"` // The error output if present Error string `json:"error"` // The TimeLine TimeLine int `json:"timeline"` }
BarmanBackup represent a backup as created by Barman
type Catalog ¶
type Catalog struct { // The list of backups List []BarmanBackup `json:"backups_list"` }
Catalog is a list of backup infos belonging to the same server
func NewCatalog ¶
func NewCatalog(list []BarmanBackup) *Catalog
NewCatalog creates a new sorted backup catalog, given a list of backup infos belonging to the same server.
func (*Catalog) FindBackupInfo ¶ added in v1.15.2
func (catalog *Catalog) FindBackupInfo(recoveryTarget *v1.RecoveryTarget) (*BarmanBackup, error)
FindBackupInfo finds the backup info that should be used to file a PITR request via target parameters specified within `RecoveryTarget`
func (*Catalog) FirstRecoverabilityPoint ¶
FirstRecoverabilityPoint gets the start time of the first backup in the catalog
func (*Catalog) LatestBackupInfo ¶
func (catalog *Catalog) LatestBackupInfo() *BarmanBackup
LatestBackupInfo gets the information about the latest successful backup
Click to show internal directories.
Click to hide internal directories.