Browse Source

Fix filer.backup deletes files in backup folder in incremental mode

fix https://github.com/chrislusf/seaweedfs/issues/2919
pull/2921/head
chrislu 3 years ago
parent
commit
1384529eb7
  1. 3
      weed/command/filer_sync.go

3
weed/command/filer_sync.go

@ -267,8 +267,11 @@ func genProcessFunction(sourcePath string, targetPath string, dataSink sink.Repl
return nil return nil
} }
key := buildKey(dataSink, message, targetPath, sourceOldKey, sourcePath) key := buildKey(dataSink, message, targetPath, sourceOldKey, sourcePath)
if !dataSink.IsIncremental() {
return dataSink.DeleteEntry(key, message.OldEntry.IsDirectory, message.DeleteChunks, message.Signatures) return dataSink.DeleteEntry(key, message.OldEntry.IsDirectory, message.DeleteChunks, message.Signatures)
} }
return nil
}
// handle new entries // handle new entries
if filer_pb.IsCreate(resp) { if filer_pb.IsCreate(resp) {

Loading…
Cancel
Save