Documentation
¶
Index ¶
- func Download(model config.ModelConfig, fileKey string) (string, error)
- func Run(model config.ModelConfig, archivePath string) (err error)
- type Azure
- type Base
- type Cycler
- type FTP
- type FileItem
- type GCS
- type Local
- type OSS
- type Package
- type PackageList
- type S3
- type SCP
- type SFTP
- type SSH
- type Storage
- type WebDAV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Azure ¶
type Azure struct { Base // contains filtered or unexported fields }
Azure - Microsoft Azure Blob Storage
type: azure # Storage Account account: gobackup-test # Container name container: gobackup path: backups # Authorization https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication tenant_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx client_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx client_secret: xxxxxxxxxxxxxxxxx timeout: 300
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base storage When `archivePath` is a directory, `fileKeys` stores files in the `archivePath` with directory prefix
type FTP ¶
type FTP struct { Base // contains filtered or unexported fields }
FTP storage
type: ftp path: /backups host: ftp.your-host.com port: 21 timeout: 30 username: password: tls: explicit_tls: no_check_certificate:
type FileItem ¶
type GCS ¶
type GCS struct { Base // contains filtered or unexported fields }
GCS - Google Clound storage
type: gcs bucket: gobackup-test path: backups credentials: { ... } credentials_file: timeout: 300
type Local ¶
type Local struct { Base // contains filtered or unexported fields }
Local storage
type: local path: /data/backups
type OSS ¶
type OSS struct { Base // contains filtered or unexported fields }
OSS - Aliyun OSS storage
type: oss bucket: gobackup-test endpoint: oss-cn-beijing.aliyuncs.com path: / access_key_id: your-access-key-id access_key_secret: your-access-key-secret max_retries: 5 timeout: 300 threads: 1 (1 .. 100)
type Package ¶
type Package struct { FileKey string `json:"file_key"` FileKeys []string `json:"file_keys,omitempty"` CreatedAt time.Time `json:"created_at"` }
When `FileKeys` is not empty, `FileKey` is the directory
type PackageList ¶
type PackageList []Package
type S3 ¶
S3 - Amazon S3 storage
type: s3 bucket: gobackup-test region: us-east-1 path: backups access_key_id: your-access-key-id secret_access_key: your-secret-access-key max_retries: 5 timeout: 300
type SSH ¶
type SSH struct {
// contains filtered or unexported fields
}
SSH
host: port: 22 username: password: timeout: 300 private_key: ~/.ssh/id_rsa passpharase:
type Storage ¶
type Storage interface {
// contains filtered or unexported methods
}
Storage interface
type WebDAV ¶
type WebDAV struct { Base // contains filtered or unexported fields }
WebDAV storage
# Install WebDAV Server on macOS https://github.com/hacdias/webdav/releases/tag/v4.2.0
echo "users:\n - username: admin\n password: admin" > config.yml ./webdav --port 8080 -c config.yml
type: webdav root: http://localhost:8080 username: password: path: backups