backup

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadConnection = errors.New("the connection hasn't reflected the latest user's privileges")

Functions

This section is empty.

Types

type BackupManager

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

func NewBackupManager

func NewBackupManager(cfg *rest.Config, bc bucket.Bucket, dir, ns, name, password string, threads int) (*BackupManager, error)

func (*BackupManager) Backup

func (bm *BackupManager) Backup(ctx context.Context) error

func (*BackupManager) ChoosePod

func (bm *BackupManager) ChoosePod(ctx context.Context, pods []*corev1.Pod) (int, bool, error)

ChoosePod chooses a pod to take a backup from. It returns the index of the chosen pod and whether backupBinlog should be called.

func (*BackupManager) GetUUIDSet added in v0.20.0

func (bm *BackupManager) GetUUIDSet(ctx context.Context, pods []*corev1.Pod) (map[string]string, error)

type ByteCountWriter

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

ByteCountWriter counts the written data in bytes

func (*ByteCountWriter) Write

func (w *ByteCountWriter) Write(data []byte) (int, error)

Write implements io.Writer interface.

func (*ByteCountWriter) Written

func (w *ByteCountWriter) Written() int64

Written returns the number of written bytes.

type RestoreManager

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

func NewRestoreManager

func NewRestoreManager(cfg *rest.Config, bc bucket.Bucket, dir, srcNS, srcName, ns, name, password string, threads int, restorePoint time.Time, schema string) (*RestoreManager, error)

func (*RestoreManager) FindNearestDump

func (rm *RestoreManager) FindNearestDump(keys []string) (string, string, time.Time)

FindNearestDump finds the nearest dump file and binlog file to the restore point. `keys` are object keys for the restoring instance. They need not be sorted.

func (*RestoreManager) Restore

func (rm *RestoreManager) Restore(ctx context.Context) error

Jump to

Keyboard shortcuts

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