borgbackup works in webinterface, but cronjobs don't work

    • OMV 5.x (beta)
    • Resolved
    • borgbackup works in webinterface, but cronjobs don't work

      Hello,

      I successfully configured (i think) borgbackupo on my omv5 virtual machine
      Running borg from webinterface works fine (as far I can see).
      But the cron jobs throws errors:
      I get mails about failing hourly jobs.

      Source Code

      1. Fri Jan 17 10:05:01 CET 2020 Starting backup
      2. Repository /root/{{ ns.uri }} does not exist.
      3. terminating with error status, rc 2
      4. Fri Jan 17 10:05:01 CET 2020 Pruning repository
      5. Repository /root/{{ ns.uri }} does not exist.
      6. terminating with error status, rc 2
      7. Fri Jan 17 10:05:01 CET 2020 Starting backup
      8. Repository /root/{{ ns.uri }} does not exist.
      9. terminating with error status, rc 2
      10. Fri Jan 17 10:05:02 CET 2020 Pruning repository
      11. Repository /root/{{ ns.uri }} does not exist.
      12. terminating with error status, rc 2
      13. Fri Jan 17 10:05:02 CET 2020 Starting backup
      14. Repository /root/{{ ns.uri }} does not exist.
      15. terminating with error status, rc 2
      16. Fri Jan 17 10:05:02 CET 2020 Pruning repository
      17. Repository /root/{{ ns.uri }} does not exist.
      18. terminating with error status, rc 2
      Display All


      Looking into cronjob script, it seems, that a variable isn't set correctly:


      Shell-Script

      1. root@omv5:/etc/cron.hourly# cat /var/lib/openmediavault/borgbackup/hourly.d/borgbackup-2cd25511-2a21-407e-a6f3-97389fe1f96d
      2. #!/bin/sh
      3. # This file is auto-generated by openmediavault (https://www.openmediavault.org)
      4. # WARNING: Do not edit this file, your changes will get lost.
      5. # Setting this, so the repo does not need to be given on the commandline:
      6. export BORG_REPO='{{ ns.uri }}'
      On my omv installation (omv4 this lines is replcaed with the correct path to the remote repo.

      Shell-Script

      1. root@omv:~# cat /var/lib/openmediavault/borgbackup/hourly.d/borgbackup-02e22c68-6ee5-4176-981e-89ab5df63ec3
      2. #!/bin/sh
      3. # Setting this, so the repo does not need to be given on the commandline:
      4. export BORG_REPO='borgbackup@servername:reponame'
      soething seems to be wrong with the implementation of borg backup on omv5?

      Thank you for the great omv! I'm running it since Version 2 and it's such a pleasure to use it!

      Best regards
      Thomas
    • smiler wrote:

      soething seems to be wrong with the implementation of borg backup on omv5?
      No need to post in the forum and github at the same time. I posted on the issue. I definitely think this is a problem with your system since it is working fine on mine.
      omv 5.3.2 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.4
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hello,

      sorry about that, I wasn't unure about the right place and where the right person is reading...

      It was also unclear if there is an user error or an "real" bug...

      What should be the prefered way in your opinion?

      Anyway, thanks for fixing, I installed the update and ist works now!

      Best regards
      Thomas
    • I guess if you know it is a bug, file an issue on github. For anything else, posting on the forum is fine. More people see it on the forum. I should see it either way. Glad it is working now.
      omv 5.3.2 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.4
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!