mirror of
https://github.com/octoleo/restic.git
synced 2024-11-30 08:44:02 +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:
parent
0fceeb20f1
commit
deb6dd7f72
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user