Documentation ¶
Index ¶
- func Scan(dirs []string, filter pipe.SelectFunc, p *restic.Progress) (restic.Stat, error)
- func TestSnapshot(t testing.TB, repo restic.Repository, path string, parent *restic.ID) *restic.Snapshot
- type Archiver
- func (arch *Archiver) Save(ctx context.Context, t restic.BlobType, data []byte, id restic.ID) error
- func (arch *Archiver) SaveFile(ctx context.Context, p *restic.Progress, node *restic.Node) (*restic.Node, error)
- func (arch *Archiver) SaveTreeJSON(ctx context.Context, tree *restic.Tree) (restic.ID, error)
- func (arch *Archiver) Snapshot(ctx context.Context, p *restic.Progress, paths, tags []string, hostname string, ...) (*restic.Snapshot, restic.ID, error)
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Archiver ¶
type Archiver struct { Warn func(dir string, fi os.FileInfo, err error) SelectFilter pipe.SelectFunc Excludes []string WithAccessTime bool // contains filtered or unexported fields }
Archiver is used to backup a set of directories.
func (*Archiver) SaveFile ¶
func (arch *Archiver) SaveFile(ctx context.Context, p *restic.Progress, node *restic.Node) (*restic.Node, error)
SaveFile stores the content of the file on the backend as a Blob by calling Save for each chunk.
func (*Archiver) SaveTreeJSON ¶
SaveTreeJSON stores a tree in the repository.
func (*Archiver) Snapshot ¶
func (arch *Archiver) Snapshot(ctx context.Context, p *restic.Progress, paths, tags []string, hostname string, parentID *restic.ID, time time.Time) (*restic.Snapshot, restic.ID, error)
Snapshot creates a snapshot of the given paths. If parentrestic.ID is set, this is used to compare the files to the ones archived at the time this snapshot was taken.
Click to show internal directories.
Click to hide internal directories.