mirror of
https://github.com/restic/restic.git
synced 2025-08-20 21:47:39 +00:00
Even if file changes size during backup, still save it
Previously such files (typically log files) wouldn't be backed up at all! The proper behaviour is to backup what we can, and warn the operator that file is possibly not complete. But it is a warning, not an error. Closes #689
This commit is contained in:
@@ -197,7 +197,7 @@ func updateNodeContent(node *restic.Node, results []saveResult) error {
|
||||
}
|
||||
|
||||
if bytes != node.Size {
|
||||
return errors.Errorf("errors saving node %q: saved %d bytes, wanted %d bytes", node.Path, bytes, node.Size)
|
||||
fmt.Fprintf(os.Stderr, "warning for %v: expected %d bytes, saved %d bytes\n", node.Path, node.Size, bytes)
|
||||
}
|
||||
|
||||
debug.Log("SaveFile(%q): %v blobs\n", node.Path, len(results))
|
||||
|
Reference in New Issue
Block a user