I am running restic backup via cron and dumping the standard output to /dev/null, so I only get notifications if anything is output to the standard error stream.
Unfortunately, and most frequently with log files, I’ll get errors like this:
warning for /Library/Server/Logs/caldavd_agent.log: expected 97820089 bytes, saved 97821789 bytes
Obviously, the log file was appended to between the file scan and the actual archiving of the file. I’m not sure of an appropriate way to handle situations like this, because I can imagine that sometimes this is a problem, so I don’t think the error should be completely suppressed. But I have a dozen servers that back up every hour, and I get at least one error like this from each server each hour and it adds up.
Having the same issue here. Currently we solved it by moving those messages to Trash with a Sieve rule, but that’s not a proper solution. Wondering if this warning should be removed from
--quiet reports as it’s not an error.
I haven’t written a mail filter because I’m concerned that there could be a legitimate error in an email that also contains this spurious error message. I’d hate to miss something important.
why not filter out anything *.log when doing the backup?
Because it’s usually, but not always the log files that are the problem. Plus, sometimes having a backup of log files is necessary.
Why not always backup rotated logs instead of live logs? Given that this is an option in your scenario.
With the new archiver code I’m currently working on, these errors will be reduced a lot. If after https://github.com/restic/restic/pull/1494 is merged the errors still annoy you, let’s open an issue on GitHub and talk about it.
In general (and by default) I think the errors should be shown so that you’re informed that something is odd. Even if in this case it’s just a file for which data has been added, which is probably harmless. There are other cases (which all are reported with the same message), e.g. a file was truncated or replaced. This is a more serious error.