shell: fs.meta.save skip saving system logs

This commit is contained in:
Chris Lu 2021-08-31 23:05:56 -07:00
parent 0ee208c1a4
commit cca588429b

View file

@ -3,6 +3,7 @@ package shell
import ( import (
"flag" "flag"
"fmt" "fmt"
"github.com/chrislusf/seaweedfs/weed/filer"
"io" "io"
"os" "os"
"path/filepath" "path/filepath"
@ -125,6 +126,10 @@ func doTraverseBfsAndSaving(filerClient filer_pb.FilerClient, writer io.Writer,
err := filer_pb.TraverseBfs(filerClient, util.FullPath(path), func(parentPath util.FullPath, entry *filer_pb.Entry) { err := filer_pb.TraverseBfs(filerClient, util.FullPath(path), func(parentPath util.FullPath, entry *filer_pb.Entry) {
if strings.HasPrefix(string(parentPath), filer.SystemLogDir) {
return
}
protoMessage := &filer_pb.FullEntry{ protoMessage := &filer_pb.FullEntry{
Dir: string(parentPath), Dir: string(parentPath),
Entry: entry, Entry: entry,