borg_ynh icon indicating copy to clipboard operation
borg_ynh copied to clipboard

Fix file changed during backup

Open fflorent opened this issue 1 year ago • 3 comments

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: https://github.com/borgbackup/borg/commit/7e6afc93e918bc5549e8bd4d4153d1a47bc32566

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): https://github.com/YunoHost-Apps/synapse_ynh/issues/474#issuecomment-2198321405

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

  • [x] Code finished and ready to be reviewed/tested
  • [ ] The fix/enhancement were manually tested (if applicable) ⇒ see above

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)

fflorent avatar Aug 25 '24 13:08 fflorent

!testme

fflorent avatar Aug 25 '24 13:08 fflorent

:worm: Test Badge

yunohost-bot avatar Aug 25 '24 13:08 yunohost-bot

Alrighty! Test Badge

yunohost-bot avatar Aug 25 '24 13:08 yunohost-bot

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.

utzer avatar Dec 13 '24 08:12 utzer

I don't have the merge grant, so I need someone to review this patch.

fflorent avatar Dec 13 '24 08:12 fflorent

I don't have the merge grant, so I need someone to review this patch.

I thought so... and still not merged.

utzer avatar Dec 29 '24 15:12 utzer

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?

utzer avatar Dec 29 '24 19:12 utzer