-
Notifications
You must be signed in to change notification settings - Fork 26
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
Properly handle "borg create" status code which maybe be "1" when warning occurs (such as when a file changed during the backup) #176
Conversation
!testme |
Why is this not merged? I get 12 emails each day (during each backup one) for this problem, it made the notifications of yunohost really useless. Don't get me wrong, I am just asking, no pressure, but also wanted to explain that this is some fix that might be awaited by some people like me. |
I don't have the merge grant, so I need someone to review this patch. |
I thought so... and still not merged. |
Co-authored-by: Alexandre Aubin <[email protected]>
conf/backup_method
Outdated
# This is a warning, the script may continue, but let's warn the admin. | ||
# See: https://github.com/borgbackup/borg/issues/6989#issuecomment-1223921392 | ||
echo "Some warning were logged during the backup, you'd probably check whether it was severe or not" >&2 | ||
# Note that retco |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is truncated. I fix that.
Thanks guys! I am wondering if there is a way to stop an application before the backup, because for some applications it might be better to stop them before, I guess synapse is one of those apps? |
Problem
Fixes #159 ?
If a file has changed during the backup, the admin gets a warning and the
borg create
command exists with status code 1. This code is meant to raise attention about an issue that may not be severe:borgbackup/borg@7e6afc9
Solution
I propose to check the status code and exit only it is equal to 2 or above.
Also see this comment, which should solve the warning (I still think my patch would probably be helpful anyway for other cases): YunoHost-Apps/synapse_ynh#474 (comment)
Please note that I haven't tested it yet. I encounter the issue on production, I would like to get a review and I would be glad to beta test it afterward.
PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)