s3

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupProviderConfigS3

type BackupProviderConfigS3 struct {
	BucketName    string
	Endpoint      string
	Region        string
	AccessKey     string
	SecretKey     string
	BackupName    string
	ObjectPrefix  string
	ObjectsToKeep int64
	FS            afero.Fs
}

BackupProviderConfigS3 provides configuration for the BackupProviderS3

type BackupProviderS3

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

BackupProviderS3 implements the backup provider interface for S3

func New

New returns a S3 backup provider

func (*BackupProviderS3) CleanupBackups

func (b *BackupProviderS3) CleanupBackups(_ context.Context) error

CleanupBackups cleans up backups according to the given backup cleanup policy at the backup provider

func (*BackupProviderS3) DownloadBackup

func (b *BackupProviderS3) DownloadBackup(ctx context.Context, version *providers.BackupVersion, outDir string) (string, error)

DownloadBackup downloads the given backup version to the specified folder

func (*BackupProviderS3) EnsureBackupBucket

func (b *BackupProviderS3) EnsureBackupBucket(ctx context.Context) error

EnsureBackupBucket ensures a backup bucket at the backup provider

func (*BackupProviderS3) GetNextBackupName

func (b *BackupProviderS3) GetNextBackupName(_ context.Context) string

GetNextBackupName returns a name for the next backup archive that is going to be uploaded

func (*BackupProviderS3) ListBackups

ListBackups lists the available backups of the backup provider

func (*BackupProviderS3) UploadBackup

func (b *BackupProviderS3) UploadBackup(ctx context.Context, sourcePath string) error

UploadBackup uploads a backup to the backup provider

Jump to

Keyboard shortcuts

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