Documentation ¶
Index ¶
- Variables
- type Provider
- func NewKopiaUploaderProvider(ctx context.Context, credGetter *credentials.CredentialGetter, ...) (Provider, error)
- func NewResticUploaderProvider(repoIdentifier string, bsl *velerov1api.BackupStorageLocation, ...) (Provider, error)
- func NewUploaderProvider(ctx context.Context, client client.Client, uploaderType string, ...) (Provider, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var BackupFunc = kopia.Backup
BackupFunc mainly used to make testing more convenient
View Source
var ResticBackupCMDFunc = restic.BackupCommand
mainly used to make testing more convenient
View Source
var ResticRestoreCMDFunc = restic.RestoreCommand
View Source
var RestoreFunc = kopia.Restore
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface { // RunBackup which will do backup for one specific volume and return snapshotID, isSnapshotEmpty, error // updater is used for updating backup progress which implement by third-party RunBackup( ctx context.Context, path string, tags map[string]string, parentSnapshot string, updater uploader.ProgressUpdater) (string, bool, error) // RunRestore which will do restore for one specific volume with given snapshot id and return error // updater is used for updating backup progress which implement by third-party RunRestore( ctx context.Context, snapshotID string, volumePath string, updater uploader.ProgressUpdater) error // Close which will close related repository Close(ctx context.Context) error }
Provider which is designed for one pod volume to do the backup or restore
func NewKopiaUploaderProvider ¶
func NewKopiaUploaderProvider( ctx context.Context, credGetter *credentials.CredentialGetter, backupRepo *velerov1api.BackupRepository, log logrus.FieldLogger, ) (Provider, error)
NewKopiaUploaderProvider initialized with open or create a repository
func NewResticUploaderProvider ¶
func NewResticUploaderProvider( repoIdentifier string, bsl *velerov1api.BackupStorageLocation, credGetter *credentials.CredentialGetter, repoKeySelector *v1.SecretKeySelector, log logrus.FieldLogger, ) (Provider, error)
func NewUploaderProvider ¶
func NewUploaderProvider( ctx context.Context, client client.Client, uploaderType string, repoIdentifier string, bsl *velerov1api.BackupStorageLocation, backupRepo *velerov1api.BackupRepository, credGetter *credentials.CredentialGetter, repoKeySelector *v1.SecretKeySelector, log logrus.FieldLogger, ) (Provider, error)
NewUploaderProvider initialize provider with specific uploaderType
Click to show internal directories.
Click to hide internal directories.