vtctlbackup

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XtraBackup = iota
	BuiltinBackup
	Mysqlctld
)

constants for test variants

Variables

View Source
var (
	SetupReplica3Tablet func(extraArgs []string) (*cluster.Vttablet, error)
)

Functions

func ExecTestIncrementalBackupAndRestoreToPos added in v0.18.0

func ExecTestIncrementalBackupAndRestoreToPos(t *testing.T, tcase *PITRTestCase)

ExecTestIncrementalBackupAndRestoreToPos runs a series of backups: a full backup and multiple incremental backups. in between, it makes writes to the database, and takes notes: what data was available in what backup. It then restores each and every one of those backups, in random order, and expects to find the specific data associated with the backup.

func ExecTestIncrementalBackupAndRestoreToTimestamp added in v0.18.0

func ExecTestIncrementalBackupAndRestoreToTimestamp(t *testing.T, tcase *PITRTestCase)

ExecTestIncrementalBackupAndRestoreToPos

func ExecTestIncrementalBackupOnTwoTablets added in v0.18.0

func ExecTestIncrementalBackupOnTwoTablets(t *testing.T, tcase *PITRTestCase)

ExecTestIncrementalBackupOnTwoTablets runs a series of interleaved backups on two different replicas: full and incremental. Specifically, it's designed to test how incremental backups are taken by interleaved replicas, so that they successfully build on one another.

func FlushAndPurgeBinaryLogsOnReplica added in v0.18.0

func FlushAndPurgeBinaryLogsOnReplica(t *testing.T, replicaIndex int) (lastBinlog string)

FlushAndPurgeBinaryLogsOnReplica intentionally loses all existing binary logs. It flushes into a new binary log and immediately purges all previous logs. This is used to lose information.

func FlushBinaryLogsOnReplica added in v0.18.0

func FlushBinaryLogsOnReplica(t *testing.T, replicaIndex int, count int)

FlushBinaryLogsOnReplica issues `FLUSH BINARY LOGS` <count> times

func GetReplicaGtidPurged added in v0.16.0

func GetReplicaGtidPurged(t *testing.T, replicaIndex int) string

func GetReplicaPosition added in v0.16.0

func GetReplicaPosition(t *testing.T, replicaIndex int) string

func InitTestTable added in v0.16.0

func InitTestTable(t *testing.T)

func InsertRowOnPrimary added in v0.16.0

func InsertRowOnPrimary(t *testing.T, hint string)

func LaunchCluster

func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *CompressionDetails) (int, error)

LaunchCluster : starts the cluster as per given params.

func ReadRowsFromPrimary added in v0.16.0

func ReadRowsFromPrimary(t *testing.T) (msgs []string)

func ReadRowsFromReplica added in v0.16.0

func ReadRowsFromReplica(t *testing.T, replicaIndex int) (msgs []string)

func ReadRowsFromTablet added in v0.16.0

func ReadRowsFromTablet(t *testing.T, tablet *cluster.Vttablet) (msgs []string)

func RemoveBackup added in v0.16.0

func RemoveBackup(t *testing.T, backupName string)

func TearDownCluster

func TearDownCluster()

TearDownCluster shuts down all cluster processes

func TestBackup

func TestBackup(t *testing.T, setupType int, streamMode string, stripes int, cDetails *CompressionDetails, runSpecific []string) error

TestBackup runs all the backup tests

func TestReplicaFullBackup added in v0.16.0

func TestReplicaFullBackup(t *testing.T, replicaIndex int) (manifest *mysqlctl.BackupManifest)

func TestReplicaFullRestore added in v0.18.0

func TestReplicaFullRestore(t *testing.T, replicaIndex int, expectError string)

func TestReplicaIncrementalBackup added in v0.16.0

func TestReplicaIncrementalBackup(t *testing.T, replicaIndex int, incrementalFromPos string, expectEmpty bool, expectError string) (manifest *mysqlctl.BackupManifest, backupName string)

func TestReplicaRestoreToPos added in v0.16.0

func TestReplicaRestoreToPos(t *testing.T, replicaIndex int, restoreToPos replication.Position, expectError string)

func TestReplicaRestoreToTimestamp added in v0.18.0

func TestReplicaRestoreToTimestamp(t *testing.T, restoreToTimestamp time.Time, expectError string)

Types

type CompressionDetails added in v0.15.0

type CompressionDetails struct {
	CompressorEngineName            string
	ExternalCompressorCmd           string
	ExternalCompressorExt           string
	ExternalDecompressorCmd         string
	ManifestExternalDecompressorCmd string
}

type PITRTestCase added in v0.18.0

type PITRTestCase struct {
	Name           string
	SetupType      int
	ComprssDetails *CompressionDetails
}

Jump to

Keyboard shortcuts

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