Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupperArgs ¶
type FileTransfer ¶
func (FileTransfer) String ¶
func (ft FileTransfer) String() string
type RestorerArgs ¶
type RestorerArgs struct {
Force bool
}
type S3Transferrer ¶
type S3Transferrer struct { *RestorerArgs *BackupperArgs ctxerr.CtxErrCanceler // contains filtered or unexported fields }
S3Transferrer is a Transferrer that backups and restores files to and from S3 compatible storage
func NewS3Transferrer ¶
func NewS3Transferrer(s3Args S3Args, concurrentTransfers int, f context.CancelFunc, rateLimitingArgs retries.RateLimiterArgs, restorerArgs *RestorerArgs, backuperArgs *BackupperArgs) *S3Transferrer
func (*S3Transferrer) Backup ¶
func (t *S3Transferrer) Backup(ctx context.Context, ft FileTransfer)
Backup backups one or more files to S3
- If ft.Local ends with a '/', it is considered a directory and all files in that directory will be restored.
- If ft.Local ends with a '*', it is considered a directory and all files in that directory will be restored recursively.
- If ft.Local does not end with any of '/' and '*', it will be considered a file.
func (*S3Transferrer) Restore ¶
func (t *S3Transferrer) Restore(ctx context.Context, ft FileTransfer)
Restore restores one or more files from S3
- If ft.Remote ends with a '/', it is considered a directory and all files in that directory will be restored. In this case, ft.Local must be a directory as well.
- If ft.Remote ends with a '/*', it is considered a prefix and all files with that prefix will be restored. In this case, ft.Local must be a directory as well.
- If ft.Remote does not end with any of '/' and '/*', it will be considered as a file and will be restored In this case, ft.Local must be a file as well.
func (*S3Transferrer) Wait ¶
func (t *S3Transferrer) Wait()
type Transferrer ¶
type Transferrer interface { Backup(ft FileTransfer) error Restore(ft FileTransfer) error }
Click to show internal directories.
Click to hide internal directories.