s3backupstorage

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

Recently added options to enable usage of an S3 appliance: Cloudian
HyperStore:
        -s3_backup_aws_endpoint <host:port> (port is required)
        -s3_backup_force_path_style=true/false
        -s3_backup_log_level <level> can be one of: LogOff, LogDebug, LogDebugWithSigning, LogDebugWithHTTPBody, LogDebugWithRequestRetries, LogDebugWithRequestErrors.  Default: LogOff

By default the s3 client will try to connect to
<path>.<region>.amazonaws.com.  Adjusting the endpoint will allow this
to be changed.

Given the way the FQDN is configured the TLS certificate may not match the
server's "base" (<region>.<end_point_address>) due to the leading <path>
so setting -s3_backup_force_path_style=true will force the s3 client to
connect to <region>.<endpoint> and then make a request using the full
path within the http calls.

-s3backup_log_level enables more verbose logging of the S3 calls.

Documentation

Overview

Package s3backupstorage implements the BackupStorage interface for AWS S3.

AWS access credentials are configured via standard AWS means, such as: - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables - credentials file at ~/.aws/credentials - if running on an EC2 instance, an IAM role See details at http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3BackupHandle

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

S3BackupHandle implements the backupstorage.BackupHandle interface.

func (*S3BackupHandle) AbortBackup

func (bh *S3BackupHandle) AbortBackup(ctx context.Context) error

AbortBackup is part of the backupstorage.BackupHandle interface.

func (*S3BackupHandle) AddFile

func (bh *S3BackupHandle) AddFile(ctx context.Context, filename string, filesize int64) (io.WriteCloser, error)

AddFile is part of the backupstorage.BackupHandle interface.

func (*S3BackupHandle) Directory

func (bh *S3BackupHandle) Directory() string

Directory is part of the backupstorage.BackupHandle interface.

func (*S3BackupHandle) EndBackup

func (bh *S3BackupHandle) EndBackup(ctx context.Context) error

EndBackup is part of the backupstorage.BackupHandle interface.

func (*S3BackupHandle) Name

func (bh *S3BackupHandle) Name() string

Name is part of the backupstorage.BackupHandle interface.

func (*S3BackupHandle) ReadFile

func (bh *S3BackupHandle) ReadFile(ctx context.Context, filename string) (io.ReadCloser, error)

ReadFile is part of the backupstorage.BackupHandle interface.

type S3BackupStorage

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

S3BackupStorage implements the backupstorage.BackupStorage interface.

func (*S3BackupStorage) Close

func (bs *S3BackupStorage) Close() error

Close is part of the backupstorage.BackupStorage interface.

func (*S3BackupStorage) ListBackups

func (bs *S3BackupStorage) ListBackups(ctx context.Context, dir string) ([]backupstorage.BackupHandle, error)

ListBackups is part of the backupstorage.BackupStorage interface.

func (*S3BackupStorage) RemoveBackup

func (bs *S3BackupStorage) RemoveBackup(ctx context.Context, dir, name string) error

RemoveBackup is part of the backupstorage.BackupStorage interface.

func (*S3BackupStorage) StartBackup

func (bs *S3BackupStorage) StartBackup(ctx context.Context, dir, name string) (backupstorage.BackupHandle, error)

StartBackup is part of the backupstorage.BackupStorage interface.

Jump to

Keyboard shortcuts

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