Versions in this module Expand all Collapse all v0 v0.18.0 Mar 27, 2025 Changes in this version + type RejectByNameFunc func(path string) bool + type RejectFunc func(path string, fi *fs.ExtendedFileInfo, fs fs.FS) bool + func RejectByDevice(samples []string, filesystem fs.FS) (RejectFunc, error) + func RejectBySize(maxSize int64) (RejectFunc, error) + func RejectCloudFiles(warnf func(msg string, args ...interface{})) (RejectFunc, error) + func RejectIfPresent(excludeFileSpec string, warnf func(msg string, args ...interface{})) (RejectFunc, error) type SelectByNameFunc + func CombineRejectByNames(funcs []RejectByNameFunc) SelectByNameFunc type SelectFunc + func CombineRejects(funcs []RejectFunc) SelectFunc type Summary + BackupEnd time.Time + BackupStart time.Time + type ToNoder interface + ToNode func(ignoreXattrListError bool) (*restic.Node, error) v0.17.3 Nov 8, 2024 v0.17.2 Oct 27, 2024 v0.17.1 Sep 5, 2024 v0.17.0 Jul 26, 2024 Changes in this version + type ChangeStats struct + Changed uint + New uint + Unchanged uint type SnapshotOptions + BackupStart time.Time + SkipIfUnchanged bool + type Summary struct + Dirs ChangeStats + Files ChangeStats + ProcessedBytes uint64 + type TestHardlink struct + Target string + func (s TestHardlink) String() string v0.16.5 Jul 1, 2024 v0.16.4 Feb 4, 2024 v0.16.3 Jan 14, 2024 v0.16.2 Oct 29, 2023 v0.16.1 Oct 24, 2023 v0.16.0 Jul 31, 2023 Changes in this version + const ChangeIgnoreCtime + const ChangeIgnoreInode + func TestCreateFiles(t testing.TB, target string, dir TestDir) + func TestEnsureFileContent(ctx context.Context, t testing.TB, repo restic.Repository, filename string, ...) + func TestEnsureFiles(t testing.TB, target string, dir TestDir) + func TestEnsureSnapshot(t testing.TB, repo restic.Repository, snapshotID restic.ID, dir TestDir) + func TestEnsureTree(ctx context.Context, t testing.TB, prefix string, repo restic.Repository, ...) + func TestSnapshot(t testing.TB, repo restic.Repository, path string, parent *restic.ID) *restic.Snapshot + func TestWalkFiles(t testing.TB, target string, dir TestDir, fn TestWalkFunc) + type Archiver struct + ChangeIgnoreFlags uint + CompleteBlob func(bytes uint64) + CompleteItem func(item string, previous, current *restic.Node, s ItemStats, d time.Duration) + Error ErrorFunc + FS fs.FS + Options Options + Repo restic.Repository + Select SelectFunc + SelectByName SelectByNameFunc + StartFile func(filename string) + WithAtime bool + func New(repo restic.Repository, fs fs.FS, opts Options) *Archiver + func (arch *Archiver) Save(ctx context.Context, snPath, target string, previous *restic.Node) (fn FutureNode, excluded bool, err error) + func (arch *Archiver) SaveDir(ctx context.Context, snPath string, dir string, fi os.FileInfo, ...) (d FutureNode, err error) + func (arch *Archiver) SaveTree(ctx context.Context, snPath string, atree *Tree, previous *restic.Tree, ...) (FutureNode, int, error) + func (arch *Archiver) Snapshot(ctx context.Context, targets []string, opts SnapshotOptions) (*restic.Snapshot, restic.ID, error) + type BlobSaver struct + func NewBlobSaver(ctx context.Context, wg *errgroup.Group, repo Saver, workers uint) *BlobSaver + func (s *BlobSaver) Save(ctx context.Context, t restic.BlobType, buf *Buffer, ...) + func (s *BlobSaver) TriggerShutdown() + type Buffer struct + Data []byte + func (b *Buffer) Release() + type BufferPool struct + func NewBufferPool(max int, defaultSize int) *BufferPool + func (pool *BufferPool) Get() *Buffer + type CompleteFunc func(*restic.Node, ItemStats) + type ErrorFunc func(file string, err error) error + type FileSaver struct + CompleteBlob func(bytes uint64) + NodeFromFileInfo func(snPath, filename string, fi os.FileInfo) (*restic.Node, error) + func NewFileSaver(ctx context.Context, wg *errgroup.Group, save SaveBlobFn, pol chunker.Pol, ...) *FileSaver + func (s *FileSaver) Save(ctx context.Context, snPath string, target string, file fs.File, ...) FutureNode + func (s *FileSaver) TriggerShutdown() + type FutureNode struct + type ItemStats struct + DataBlobs int + DataSize uint64 + DataSizeInRepo uint64 + TreeBlobs int + TreeSize uint64 + TreeSizeInRepo uint64 + func (s *ItemStats) Add(other ItemStats) + type Options struct + ReadConcurrency uint + SaveBlobConcurrency uint + SaveTreeConcurrency uint + func (o Options) ApplyDefaults() Options + type SaveBlobFn func(context.Context, restic.BlobType, *Buffer, func(res SaveBlobResponse)) + type SaveBlobResponse struct + type Saver interface + SaveBlob func(ctx context.Context, t restic.BlobType, data []byte, id restic.ID, ...) (restic.ID, bool, int, error) + type ScanStats struct + Bytes uint64 + Dirs uint + Files uint + Others uint + type Scanner struct + Error ErrorFunc + FS fs.FS + Result func(item string, s ScanStats) + Select SelectFunc + SelectByName SelectByNameFunc + func NewScanner(fs fs.FS) *Scanner + func (s *Scanner) Scan(ctx context.Context, targets []string) error + type SelectByNameFunc func(item string) bool + type SelectFunc func(item string, fi os.FileInfo) bool + type SnapshotOptions struct + Excludes []string + Hostname string + ParentSnapshot *restic.Snapshot + ProgramVersion string + Tags restic.TagList + Time time.Time + type TestDir map[string]interface + func (d TestDir) String() string + type TestFile struct + Content string + func (f TestFile) String() string + type TestSymlink struct + Target string + func (s TestSymlink) String() string + type TestWalkFunc func(path string, item interface{}) error + type Tree struct + FileInfoPath string + Nodes map[string]Tree + Path string + Root string + func NewTree(fs fs.FS, targets []string) (*Tree, error) + func (t *Tree) Add(fs fs.FS, path string) error + func (t Tree) Leaf() bool + func (t Tree) NodeNames() []string + func (t Tree) String() string + type TreeSaver struct + func NewTreeSaver(ctx context.Context, wg *errgroup.Group, treeWorkers uint, ...) *TreeSaver + func (s *TreeSaver) Save(ctx context.Context, snPath string, target string, node *restic.Node, ...) FutureNode + func (s *TreeSaver) TriggerShutdown()