Documentation
¶
Overview ¶
Package backup manages the backup creation process
Index ¶
- type Command
- func (b *Command) CreatePgbackrestStanza(ctx context.Context, stanza string, env []string) error
- func (b *Command) GetDataConfiguration(options []string) ([]string, error)
- func (b *Command) GetExecutedBackupInfo(ctx context.Context, backupName string, stanza string, env []string) (*pgbackrestCatalog.Catalog, error)
- func (b *Command) GetPgbackrestBackupOptions(ctx context.Context, backupName string, stanza string) ([]string, error)
- func (b *Command) IsCompatible(postgresVers semver.Version) error
- func (b *Command) Take(ctx context.Context, backupName string, stanza string, env []string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command represents a pgbackrest backup command
func NewBackupCommand ¶
func NewBackupCommand( configuration *pgbackrestApi.PgbackrestConfiguration, backupConfig *cnpgApiV1.BackupPluginConfiguration, pgDataDirectory string, ) *Command
NewBackupCommand creates a new pgbackrest backup command
func (*Command) CreatePgbackrestStanza ¶
CreatePgbackrestStanza ensures that the destinationArchive is ready to perform archiving. It's safe to re-run pgbackrest stanza-create on an existing archive, command will fail if another database was used to create it.
func (*Command) GetDataConfiguration ¶
GetDataConfiguration gets the configuration in the `Data` object of the pgbackrest configuration
func (*Command) GetExecutedBackupInfo ¶
func (b *Command) GetExecutedBackupInfo( ctx context.Context, backupName string, stanza string, env []string, ) (*pgbackrestCatalog.Catalog, error)
GetExecutedBackupInfo get the status information about the executed backup
func (*Command) GetPgbackrestBackupOptions ¶
func (b *Command) GetPgbackrestBackupOptions( ctx context.Context, backupName string, stanza string, ) ([]string, error)
GetPgbackrestBackupOptions extract the list of command line options to be used with pgbackrest backup
func (*Command) IsCompatible ¶
IsCompatible checks if pgbackrest can back up this version of PostgreSQL