xtrabackup

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 27 Imported by: 1 module, 0 packages

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteJobName added in v0.3.0

func DeleteJobName(cr *apiv1.PerconaServerMySQLBackup) string

func DeleteName added in v0.3.0

func DeleteName(cr *apiv1.PerconaServerMySQLBackup) string

func GetDeleteJob added in v0.3.0

func GetDeleteJob(cluster *apiv1.PerconaServerMySQL, cr *apiv1.PerconaServerMySQLBackup, conf *BackupConfig, initImage string) *batchv1.Job

func GetDestination added in v0.12.0

GetDestination returns the destination for the backup.

func Job

func Job(
	cluster *apiv1.PerconaServerMySQL,
	cr *apiv1.PerconaServerMySQLBackup,
	destination apiv1.BackupDestination, initImage string,
	storage *apiv1.BackupStorageSpec,
) (*batchv1.Job, error)

func JobNamespacedName added in v0.9.0

func JobNamespacedName(cr *apiv1.PerconaServerMySQLBackup) types.NamespacedName

func PrepareJob added in v1.3.0

func PrepareJob(
	cluster *apiv1.PerconaServerMySQL,
	restore *apiv1.PerconaServerMySQLRestore,
	storage *apiv1.BackupStorageSpec,
	initImage string,
) *batchv1.Job

func PrepareJobName added in v1.3.0

func PrepareJobName(restore *apiv1.PerconaServerMySQLRestore) string

func RestoreJob

func RestoreJob(
	cluster *apiv1.PerconaServerMySQL,
	destination DestinationInfo,
	restore *apiv1.PerconaServerMySQLRestore,
	storage *apiv1.BackupStorageSpec,
	initImage string,
	pvcName string,
) *batchv1.Job

func RestoreName

func RestoreName(cr *apiv1.PerconaServerMySQLRestore) string

func SetEncryptionKeyFileVersion added in v1.2.0

func SetEncryptionKeyFileVersion(job *batchv1.Job, ver string) error

func SetIncrementalLsn added in v1.1.0

func SetIncrementalLsn(job *batchv1.Job, lsn string) error

func SetSourceNode

func SetSourceNode(job *batchv1.Job, src string) error

func SetStorageAzure

func SetStorageAzure(job *batchv1.Job, azure *apiv1.BackupStorageAzureSpec) error

func SetStorageGCS

func SetStorageGCS(job *batchv1.Job, gcs *apiv1.BackupStorageGCSSpec) error

func SetStorageS3

func SetStorageS3(job *batchv1.Job, s3 *apiv1.BackupStorageS3Spec) error

Types

type BackupConfig added in v0.3.0

type BackupConfig struct {
	Destination          string                        `json:"destination"`
	Type                 apiv1.BackupStorageType       `json:"type"`
	VerifyTLS            bool                          `json:"verifyTLS,omitempty"`
	CACert               string                        `json:"caCert,omitempty"`
	ContainerOptions     *apiv1.BackupContainerOptions `json:"containerOptions,omitempty"`
	S3                   BackupConfigS3                `json:"s3"`
	GCS                  BackupConfigGCS               `json:"gcs"`
	Azure                BackupConfigAzure             `json:"azure"`
	EncryptionKeyFile    string                        `json:"encryptionKeyFile,omitempty"`
	EncryptionKeyVersion string                        `json:"encryptionKeyVersion,omitempty"`

	// Specify for incremental backups
	IncrementalLsn string `json:"incrementalLsn,omitempty"`
}

func GetBackupConfig added in v0.12.0

func GetBackupConfig(ctx context.Context, cl client.Client, cr *apiv1.PerconaServerMySQLBackup) (*BackupConfig, error)

func (*BackupConfig) XbcloudDeleteArgs added in v1.1.0

func (conf *BackupConfig) XbcloudDeleteArgs() []string

func (*BackupConfig) XbcloudGetArgs added in v1.1.0

func (conf *BackupConfig) XbcloudGetArgs(files ...string) []string

func (*BackupConfig) XbcloudPutArgs added in v1.1.0

func (conf *BackupConfig) XbcloudPutArgs() []string

func (*BackupConfig) XtrabackupArgs added in v1.3.0

func (conf *BackupConfig) XtrabackupArgs() []string

type BackupConfigAzure added in v1.0.0

type BackupConfigAzure struct {
	ContainerName  string `json:"containerName"`
	EndpointURL    string `json:"endpointUrl,omitempty"`
	StorageClass   string `json:"storageClass,omitempty"`
	StorageAccount string `json:"storageAccount,omitempty"`
	AccessKey      string `json:"accessKey,omitempty"`
}

type BackupConfigGCS added in v1.0.0

type BackupConfigGCS struct {
	Bucket       string `json:"bucket"`
	EndpointURL  string `json:"endpointUrl,omitempty"`
	StorageClass string `json:"storageClass,omitempty"`
	AccessKey    string `json:"accessKey,omitempty"`
	SecretKey    string `json:"secretKey,omitempty"`
}

type BackupConfigS3 added in v1.0.0

type BackupConfigS3 struct {
	Bucket       string `json:"bucket"`
	Region       string `json:"region,omitempty"`
	EndpointURL  string `json:"endpointUrl,omitempty"`
	StorageClass string `json:"storageClass,omitempty"`
	AccessKey    string `json:"accessKey,omitempty"`
	SecretKey    string `json:"secretKey,omitempty"`
}

type BackupInfo added in v1.3.0

type BackupInfo struct {
	BackupType             string `json:"backup_type"`
	FromLSN                string `json:"from_lsn"`
	ToLSN                  string `json:"to_lsn"`
	LastLSN                string `json:"last_lsn"`
	FlushedLSN             string `json:"flushed_lsn"`
	RedoMemory             string `json:"redo_memory"`
	RedoFrames             string `json:"redo_frames"`
	BackupSize             int64  `json:"backup_size"`
	UncompressedBackupSize int64  `json:"uncompressed_backup_size"`
}

func (*BackupInfo) ParseFrom added in v1.3.0

func (info *BackupInfo) ParseFrom(r io.Reader) error

type DestinationInfo added in v1.1.0

type DestinationInfo struct {
	Base         string
	Incrementals []string
}

type NewSidecarClientFunc added in v0.7.0

type NewSidecarClientFunc func(srcNode string) SidecarClient

type SidecarClient added in v0.7.0

type SidecarClient interface {
	GetRunningBackupConfig(ctx context.Context) (*BackupConfig, error)
	DeleteBackup(ctx context.Context, name string, cfg BackupConfig) error
	// Deprecated: Use GetBackupInfo instead. GetCheckpointInfo
	GetCheckpointInfo(ctx context.Context, cfg BackupConfig) (*BackupInfo, error)
	GetBackupInfo(ctx context.Context, cfg BackupConfig) (*BackupInfo, error)
}

func NewSidecarClient added in v0.7.0

func NewSidecarClient(srcNode string) SidecarClient

type XBCloudAction added in v0.3.0

type XBCloudAction string
const (
	XBCloudActionPut    XBCloudAction = "put"
	XBCloudActionDelete XBCloudAction = "delete"
	XBCloudActionGet    XBCloudAction = "get"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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