restorer

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Restorer

type Restorer struct {
	Error        func(dir string, node *restic.Node, err error) error
	SelectFilter func(item string, dstpath string, node *restic.Node) (selectedForRestore bool, childMayBeSelected bool)
	// contains filtered or unexported fields
}

Restorer is used to restore a snapshot to a directory.

func NewRestorer

func NewRestorer(repo restic.Repository, id restic.ID) (*Restorer, error)

NewRestorer creates a restorer preloaded with the content from the snapshot id.

func (*Restorer) RestoreTo

func (res *Restorer) RestoreTo(ctx context.Context, dst string) error

RestoreTo creates the directories and files in the snapshot below dst. Before an item is created, res.Filter is called.

func (*Restorer) Snapshot

func (res *Restorer) Snapshot() *restic.Snapshot

Snapshot returns the snapshot this restorer is configured to use.

func (*Restorer) VerifyFiles

func (res *Restorer) VerifyFiles(ctx context.Context, dst string) (int, error)

VerifyFiles reads all snapshot files and verifies their contents

Jump to

Keyboard shortcuts

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