-
Notifications
You must be signed in to change notification settings - Fork 67
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
POST_COMMAND_FAILURE triggering if backup completes #133
Comments
I experienced this myself, but I find it very hard to create a reproducible test case. The code looks correct and the test works but does not simulate exactly the It almost seems to me that there is a restic bug in here. |
Related upstream issue: restic/restic#2165 |
Thanks for following up - will watch that restic issue for updates. |
Well, in the examples in that issue the error code 3 is correctly returned. They are asking for an additional option to completely ignore "not found" errors. I can't find an exact matching issue upstream, so maybe this is a rather a problem with our container or the script still. |
I think this is the problem;
If a file is missing Would this work?
Assuming your |
Oh, well, thanks! You spotted the right thing. The current logic is not comprehensive. AFAICS, there are 2 use cases for notifications:
If you agree, then the solution would still be a bit different than what you proposed. I can do a PR for that (unless you want to make the change to your existing PR). |
Since that would be a breaking change for users who don't have |
I think it would be best to leave this to you :). Happy with whatever you decide, my use-case is pretty simple, I just want to be notified when a backup fails and no snapshot is created. Otherwise silence is bliss :). |
I only have a notification setup for POST_COMMAND_FAILURE, not the new _INCOMPLETE hook.
However I am seeing the following in my logs (and getting a notification);
It appears as tho the _FAILURE hook is being called for non-critical failures, i.e. missing file. The backup completes and the snapshot is created so I am not expecting to see any failure notification in this instance.
The text was updated successfully, but these errors were encountered: