mysqldump

package
v0.0.0-...-398e186 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: BSD-3-Clause, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeArgs

func SanitizeArgs(args []string, old string) string

SanitizeArgs takes a slice, redacts all occurrences of a given string and returns a single string concatenated with spaces

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config holds the MySQL credentials required to authenticate with the MySQL database being backed-up or restored.

func NewConfig

func NewConfig(executor *v1alpha1.MySQLDumpBackupExecutor, creds map[string]string) *Config

NewConfig creates an mysqldump configuration based on the input parameters.

func (Config) Validate

func (c Config) Validate() (err error)

Validate checks the required configuration parameters are set.

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor creates backups using mysqldump.

func NewExecutor

func NewExecutor(executor *v1alpha1.MySQLDumpBackupExecutor, creds map[string]string) (*Executor, error)

NewExecutor creates a provider capable of creating and restoring backups with the mysqldump tool.

func (*Executor) Backup

func (ex *Executor) Backup(backupDir string, clusterName string) (io.ReadCloser, string, error)

Backup performs a full cluster backup using the mysqldump tool.

func (*Executor) Restore

func (ex *Executor) Restore(content io.ReadCloser) error

Restore a cluster from a mysqldump.

Jump to

Keyboard shortcuts

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