diff --git a/pkg/uploader/kopia/progress.go b/pkg/uploader/kopia/progress.go index 7f0619f57..9f2498379 100644 --- a/pkg/uploader/kopia/progress.go +++ b/pkg/uploader/kopia/progress.go @@ -138,7 +138,9 @@ func (p *Progress) HashingFile(fname string) {} func (p *Progress) ExcludedFile(fname string, numBytes int64) {} // ExcludedDir statistic the dir been excluded currently -func (p *Progress) ExcludedDir(dirname string) {} +func (p *Progress) ExcludedDir(dirname string) { + p.log.Infof("Excluded dir %s", dirname) +} // FinishedHashingFile which will called when specific file finished hash func (p *Progress) FinishedHashingFile(fname string, numBytes int64) { diff --git a/pkg/uploader/kopia/snapshot.go b/pkg/uploader/kopia/snapshot.go index c80ab155f..fce620eb7 100644 --- a/pkg/uploader/kopia/snapshot.go +++ b/pkg/uploader/kopia/snapshot.go @@ -127,6 +127,10 @@ func setupPolicy(ctx context.Context, rep repo.RepositoryWriter, sourceInfo snap curPolicy.UploadPolicy.ParallelUploadAboveSize = newOptionalInt64(2 << 30) } + if runtime.GOOS == "windows" { + curPolicy.FilesPolicy.IgnoreRules = []string{"/System Volume Information/", "/$Recycle.Bin/"} + } + err := setPolicyFunc(ctx, rep, sourceInfo, curPolicy) if err != nil { return nil, errors.Wrap(err, "error to set policy")