Documentation ¶
Overview ¶
Package migrations contains migrations that can be applied to a repository and/or backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All []Migration
All contains all migrations.
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration interface { // Check returns true if the migration can be applied to a repo. If the option is not applicable it can return a specific reason. Check(context.Context, restic.Repository) (bool, string, error) RepoCheck() bool // Apply runs the migration. Apply(context.Context, restic.Repository) error // Name returns a short name. Name() string // Descr returns a description what the migration does. Desc() string }
Migration implements a data migration.
type S3Layout ¶
type S3Layout struct{}
S3Layout migrates a repository on an S3 backend from the "s3legacy" to the "default" layout.
type UpgradeRepoV2 ¶ added in v0.14.0
type UpgradeRepoV2 struct{}
func (*UpgradeRepoV2) Apply ¶ added in v0.14.0
func (m *UpgradeRepoV2) Apply(ctx context.Context, repo restic.Repository) error
func (*UpgradeRepoV2) Check ¶ added in v0.14.0
func (*UpgradeRepoV2) Check(_ context.Context, repo restic.Repository) (bool, string, error)
func (*UpgradeRepoV2) Desc ¶ added in v0.14.0
func (*UpgradeRepoV2) Desc() string
func (*UpgradeRepoV2) Name ¶ added in v0.14.0
func (*UpgradeRepoV2) Name() string
func (*UpgradeRepoV2) RepoCheck ¶ added in v0.14.0
func (*UpgradeRepoV2) RepoCheck() bool
Click to show internal directories.
Click to hide internal directories.