backup

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backup implements the functions needed to invoke barman-cloud-backup

Index

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 barman backup command

func NewBackupCommand

func NewBackupCommand(
	configuration *barmanApi.BarmanObjectStoreConfiguration,
	capabilities *barmanCapabilities.Capabilities,
) *Command

NewBackupCommand creates a new barman backup command

func (*Command) GetBarmanCloudBackupOptions

func (b *Command) GetBarmanCloudBackupOptions(
	ctx context.Context,
	backupName string,
	serverName string,
	exec barmanCapabilities.LegacyExecutor,
) ([]string, error)

GetBarmanCloudBackupOptions extract the list of command line options to be used with barman-cloud-backup

func (*Command) GetDataConfiguration

func (b *Command) GetDataConfiguration(
	options []string,
) ([]string, error)

GetDataConfiguration gets the configuration in the `Data` object of the Barman configuration

func (*Command) GetExecutedBackupInfo

func (b *Command) GetExecutedBackupInfo(
	ctx context.Context,
	backupName string,
	serverName string,
	exec barmanCapabilities.LegacyExecutor,
	env []string,
) (*barmanCatalog.BarmanBackup, error)

GetExecutedBackupInfo get the status information about the executed backup

func (*Command) IsCompatible

func (b *Command) IsCompatible(postgresVers semver.Version) error

IsCompatible checks if barman can back up this version of PostgreSQL

func (*Command) Take

func (b *Command) Take(
	ctx context.Context,
	backupName string,
	serverName string,
	env []string,
	legacyExecutor barmanCapabilities.LegacyExecutor,
	backupTemporaryDirectory string,
) error

Take takes a backup

Jump to

Keyboard shortcuts

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