mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 19:54:00 +00:00
fs uploader skip system folders on windows
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user