Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning does not trigger the right hook? #236

Open
lakemike opened this issue Apr 19, 2024 · 2 comments
Open

warning does not trigger the right hook? #236

lakemike opened this issue Apr 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@lakemike
Copy link

Ony of my backups threw a warning "Partial backup, some files may not have been read completely". See first screenshot.

I thought it would trigger the hook with error conditions, but it did not.
See second screenshot.

Any advice what to do? Is this a bug?
1
2

@lakemike lakemike added the bug Something isn't working label Apr 19, 2024
@garethgeorge
Copy link
Owner

garethgeorge commented Apr 19, 2024

Thanks for the report, this is actually something I've given a bit of thought here so it's pretty interesting to hear what user expectations are

Originally this was an error, in a recent update I downgraded the warning to not trigger error notifications, but I'm ambivalent about what the right thing to do here is. Strongest argument is perhaps that this needs to be configurable.

Would people generally prefer a conservative (e.g. only notify on an actual error) or an aggressive (notify on warnings) approach here?

On platforms where these warnings are uncommon, an error is probably what you want. The error typically indicates that either a file was modified while restic read it (e.g. common with database files like a sqlite db) OR that restic wasn't able to read the file for some reason (e.g. insufficient permissions). On other setups where I just want restic to "try it's best" I'd rather not get warning spam even though warnings frequently occur (e.g. on my Windows install restic often fails to read random files in app data directories -- that probably don't matter much to me in any case).

The right answer might be a new condition e.g.CONDITION_ANY_WARNING or such to differentiate error vs warning handling and make this fully configurable.

@lakemike
Copy link
Author

I figured out the error relates to a file system problem. Not a small issue potentially, and I would like to be able to act on this in a timely issue when it comes up.

Hence..

..regarding your question, I would love having another condition for a warning. This would allow me to display it and ultimately act on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants