backup

package
v0.0.0-...-e4ed161 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupManager

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

BackupManager backups an etcd cluster.

func NewBackupManagerFromWriter

func NewBackupManagerFromWriter(kubecli kubernetes.Interface, bw writer.Writer, tc *tls.Config, endpoints []string, namespace string) *BackupManager

NewBackupManagerFromWriter creates a BackupManager with backup writer.

func (*BackupManager) EnsureMaxBackup

func (bm *BackupManager) EnsureMaxBackup(ctx context.Context, basePath string, maxCount int) error

EnsureMaxBackup to ensure the number of snapshot is under maxcount if the number of snapshot exceeded than maxcount, delete oldest snapshot

func (*BackupManager) SaveSnap

func (bm *BackupManager) SaveSnap(ctx context.Context, s3Path string, isPeriodic bool) (int64, string, *metav1.Time, error)

SaveSnap uses backup writer to save etcd snapshot to a specified S3 path and returns backup etcd server's kv store revision and its version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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