cli

package
v0.9.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESTIC_REPOSITORY = "RESTIC_REPOSITORY"
	RESTIC_PASSWORD   = "RESTIC_PASSWORD"
	TMPDIR            = "TMPDIR"

	AWS_ACCESS_KEY_ID     = "AWS_ACCESS_KEY_ID"
	AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"

	GOOGLE_PROJECT_ID               = "GOOGLE_PROJECT_ID"
	GOOGLE_SERVICE_ACCOUNT_JSON_KEY = "GOOGLE_SERVICE_ACCOUNT_JSON_KEY"
	GOOGLE_APPLICATION_CREDENTIALS  = "GOOGLE_APPLICATION_CREDENTIALS"

	AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME"
	AZURE_ACCOUNT_KEY  = "AZURE_ACCOUNT_KEY"

	REST_SERVER_USERNAME = "REST_SERVER_USERNAME"
	REST_SERVER_PASSWORD = "REST_SERVER_PASSWORD"

	B2_ACCOUNT_ID  = "B2_ACCOUNT_ID"
	B2_ACCOUNT_KEY = "B2_ACCOUNT_KEY"

	// For keystone v1 authentication
	ST_AUTH = "ST_AUTH"
	ST_USER = "ST_USER"
	ST_KEY  = "ST_KEY"
	// For keystone v2 authentication (some variables are optional)
	OS_AUTH_URL    = "OS_AUTH_URL"
	OS_REGION_NAME = "OS_REGION_NAME"
	OS_USERNAME    = "OS_USERNAME"
	OS_PASSWORD    = "OS_PASSWORD"
	OS_TENANT_ID   = "OS_TENANT_ID"
	OS_TENANT_NAME = "OS_TENANT_NAME"
	// For keystone v3 authentication (some variables are optional)
	OS_USER_DOMAIN_NAME    = "OS_USER_DOMAIN_NAME"
	OS_PROJECT_NAME        = "OS_PROJECT_NAME"
	OS_PROJECT_DOMAIN_NAME = "OS_PROJECT_DOMAIN_NAME"
	// For authentication based on tokens
	OS_STORAGE_URL = "OS_STORAGE_URL"
	OS_AUTH_TOKEN  = "OS_AUTH_TOKEN"
	//For using certs in Minio server or REST server
	CA_CERT_DATA = "CA_CERT_DATA"
)
View Source
const (
	Exe = "/bin/restic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResticWrapper

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

func New

func New(scratchDir string, enableCache bool, hostname string) *ResticWrapper

func (*ResticWrapper) Backup

func (w *ResticWrapper) Backup(resource *api.Restic, fg api.FileGroup) error

func (*ResticWrapper) Check

func (w *ResticWrapper) Check() error

func (*ResticWrapper) DeleteSnapshots

func (w *ResticWrapper) DeleteSnapshots(snapshotIDs []string) error

func (*ResticWrapper) DumpEnv

func (w *ResticWrapper) DumpEnv() error

func (*ResticWrapper) Forget

func (w *ResticWrapper) Forget(resource *api.Restic, fg api.FileGroup) error

func (*ResticWrapper) InitRepositoryIfAbsent

func (w *ResticWrapper) InitRepositoryIfAbsent() error

func (*ResticWrapper) ListSnapshots

func (w *ResticWrapper) ListSnapshots(snapshotIDs []string) ([]Snapshot, error)

func (*ResticWrapper) Restore

func (w *ResticWrapper) Restore(path, host, snapshotID string) error

func (*ResticWrapper) SetupEnv

func (w *ResticWrapper) SetupEnv(backend store.Backend, secret *core.Secret, autoPrefix string) (string, error)

type Snapshot

type Snapshot struct {
	ID       string    `json:"id"`
	Time     time.Time `json:"time"`
	Tree     string    `json:"tree"`
	Paths    []string  `json:"paths"`
	Hostname string    `json:"hostname"`
	Username string    `json:"username"`
	UID      int       `json:"uid"`
	Gid      int       `json:"gid"`
	Tags     []string  `json:"tags"`
}

Jump to

Keyboard shortcuts

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