Documentation ¶
Index ¶
- type BackupProviderConfigS3
- type BackupProviderS3
- func (b *BackupProviderS3) CleanupBackups(_ context.Context) error
- func (b *BackupProviderS3) DownloadBackup(ctx context.Context, version *providers.BackupVersion, outDir string) (string, error)
- func (b *BackupProviderS3) EnsureBackupBucket(ctx context.Context) error
- func (b *BackupProviderS3) GetNextBackupName(_ context.Context) string
- func (b *BackupProviderS3) ListBackups(ctx context.Context) (providers.BackupVersions, error)
- func (b *BackupProviderS3) UploadBackup(ctx context.Context, sourcePath string) error
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 ¶
func New(log *slog.Logger, config *BackupProviderConfigS3) (*BackupProviderS3, error)
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 ¶
func (b *BackupProviderS3) ListBackups(ctx context.Context) (providers.BackupVersions, error)
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
Click to show internal directories.
Click to hide internal directories.