Borgbackup disable email

  • In the Borgbackup, there is no options for email. None the less I get an email every day after it is completing its tasks.


    I check the /etc/cron.d and /var/lib/openmediavault/borgbackup and in the scripts there is no email.


    How come do I get an email from cron about it? How can it be disabled?

  • How is the cron job run - from crontab or the OMV Scheduled jobs?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • How is the cron job run - from crontab or the OMV Scheduled jobs?

    Well.... I did not do anything other than configuring the plugin from the UI.


    So in the schedule tasks in the UI there is no reference of borgbackup.


    gtsitouridis@atlas:/etc/cron.d$ ls -al

    total 48

    drwxr-xr-x 2 root root 4096 Aug 22 04:21 .

    drwxr-xr-x 103 root root 4096 Aug 22 04:09 ..

    -rw-r--r-- 1 root root 102 Oct 11 2019 .placeholder

    -rw-r--r-- 1 root root 285 May 19 2019 anacron

    -rw-r--r-- 1 root root 355 Jun 19 2018 cron-apt

    -rw-r--r-- 1 root root 589 Jan 15 2019 mdadm

    -rw-r--r-- 1 root root 675 Aug 20 12:50 openmediavault-borgbackup

    -rw-r--r-- 1 root root 257 Aug 22 04:21 openmediavault-clamdscan

    -rw-r--r-- 1 root root 257 Jul 27 00:00 openmediavault-powermngmt

    -rw-r--r-- 1 root root 257 Aug 20 12:33 openmediavault-rsync

    -rw-r--r-- 1 root root 779 Aug 22 00:00 openmediavault-userdefined

    -rw-r--r-- 1 root root 712 Dec 17 2018 php

    gtsitouridis@atlas:/etc/cron.d$ cat openmediavault-borgbackup


    # This file is auto-generated by openmediavault (https://www.openmediavault.org)

    # WARNING: Do not edit this file, your changes will get lost.


    # This is the cron file for openmediavault-borgbackup.

    # m h dom mon dow user command

    5 * * * * root run-parts /var/lib/openmediavault/borgbackup/hourly.d/

    30 3 * * * root run-parts /var/lib/openmediavault/borgbackup/daily.d/

    0 3 * * 1 root run-parts /var/lib/openmediavault/borgbackup/weekly.d/

    30 2 1 * * root run-parts /var/lib/openmediavault/borgbackup/monthly.d/

    00 2 1 1 * root run-parts /var/lib/openmediavault/borgbackup/yearly.d/

    gtsitouridis@atlas:/etc/cron.d$ ls /var/lib/openmediavault/borgbackup/daily.d -al

    total 20

    drwxr-xr-x 2 root root 4096 Aug 22 04:11 .

    drwxr-xr-x 7 root root 4096 Aug 20 12:50 ..

    -rwxr-x--- 1 root root 1493 Aug 21 09:42 borgbackup-12f96370-2d24-44d5-b84a-f464a653f676

    -rwxr-x--- 1 root root 1322 Aug 21 09:42 borgbackup-2893a907-44e7-4139-b4d7-5df7039e4189

    -rwxr-x--- 1 root root 1330 Aug 21 09:42 borgbackup-d469ff3f-92e8-43fd-85c4-138eff37b3d5

    gtsitouridis@atlas:/etc/cron.d$


    I though that OVM Scheduled jobs is another name from cron.

  • I though that OVM Scheduled jobs is another name from cron.

    They have the same role but the implementation differs.


    Run this and see if there is any mention of borgbackup


    Code
    sudo crontab -e

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • They have the same role but the implementation differs.


    Run this and see if there is any mention of borgbackup


    Code
    sudo crontab -e

    No cron jobs for root or my user... files are empty... except of course the comments

  • Let me add that no email is sent when I run the script manually or when I press the run button in the UI.

  • Something similar is happening with the antivirus plugin. If the plugin is sent to no email, then you still get an email when a malware is found, but without details.


    If you set it to sent an email, then you get an email from cron about the execution of the job and one more with details of the infected object, if one is found.


    Again running the script manually or by the run button, you get no email.

    • Offizieller Beitrag

    There is no way to disable the email without disabling system notifications since borg is using cron. The plugin would have to send all output from borg to /dev/null. Can't you just create a rule to delete the email?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • There is no way to disable the email without disabling system notifications since borg is using cron. The plugin would have to send all output from borg to /dev/null. Can't you just create a rule to delete the email?

    Good to know.... I was getting ready to reinstall my system, cause I thought that due to my testings I have somehow broken it.

    I did something else..... I just got a container of urbackup.... and I am now happy with more options and no annoying emails.

    By the way (though a bit off topic) do you know if OVM will have an issue with enabling dattobd on the system volume in order to take image backup as well with urbackup? - now I am using backup plugin... dd.

    • Offizieller Beitrag

    I am now happy with more options and no annoying emails.

    You call them annoying but what if you have a backup fail??


    do you know if OVM will have an issue with enabling dattobd on the system volume in order to take image backup as well with urbackup?

    I had never heard of it but from a quick read, it seems like OMV wouldn't care about it.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • You call them annoying but what if you have a backup fail??


    I had never heard of it but from a quick read, it seems like OMV wouldn't care about it.

    That's why they are annoying cause the popping in when there is nothing to report. Back in the day I was using ubuntu I was creating scripts by hand for antivirus and rsyc, which would sent email only if there was an error of any sort. So I knew that if I got mail.... then it was not good.


    Thank you for the information for OVM!

  • gtsitouridis

    Hat das Label gelöst hinzugefügt.
    • Offizieller Beitrag

    Back in the day I was using ubuntu I was creating scripts by hand for antivirus and rsyc, which would sent email only if there was an error of any sort. So I knew that if I got mail.... then it was not good.

    The return code doesn't always tell you if the backup is doing something wrong. If a crypto virus hit and your backup all of sudden backed up all of your files because they were all different (encrypted), there would be no error. I would look at seeing if I could change it but it seems you have already moved on and no one else has requested this.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The return code doesn't always tell you if the backup is doing something wrong. If a crypto virus hit and your backup all of sudden backed up all of your files because they were all different (encrypted), there would be no error. I would look at seeing if I could change it but it seems you have already moved on and no one else has requested this.

    This is true.... non the less when you know there is a problem in particular folder / file then you start looking into it. Actually there is a difference in approach.... the current format favours a report like approach where someone will ready through a report, while I need some more like a poke in order to start investigating into the problem. Are you a borgbackup developer?

    • Offizieller Beitrag

    Are you a borgbackup developer?

    Nope. I just wrote the plugin. I do use borg though but I run it manually from the command line.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Yeap, this is what I meant to say.... plugin developer. In this case I have also to report something while using the plugin.... I was getting increased memory usage.... up to 30% while no jobs of any kind were running. After uninstalling it, I got again backup to 10%-15% in "idle". Maybe it was just me, just though that may be of interest.


    If I may make a suggestion (without even knowing if it possible or not). When I was doing my clamav scripts, I got a way to realize the status from exit code and also pass the actual error as the main body in the email. For my use cases, if borgbackup was able to do something like that, it would have been perfect, or almost perfect due to the cron timings. I do run them at night.... but I would prefer something in the line of 4am-5am rather than 3am.

    • Offizieller Beitrag

    In this case I have also to report something while using the plugin.... I was getting increased memory usage.... up to 30% while no jobs of any kind were running. After uninstalling it, I got again backup to 10%-15% in "idle". Maybe it was just me, just though that may be of interest.

    Increased memory usage where? On the OMV system? The plugin itself wouldn't cause this. And if it is on the OMV system, is it just filesystem cache? I run borg on a 2gb nano pi m4 and it still has over 1gb ram free. So, it doesn't seem to be a borg memory leak.


    If I may make a suggestion (without even knowing if it possible or not). When I was doing my clamav scripts, I got a way to realize the status from exit code and also pass the actual error as the main body in the email. For my use cases, if borgbackup was able to do something like that, it would have been perfect, or almost perfect due to the cron timings. I do run them at night.... but I would prefer something in the line of 4am-5am rather than 3am.

    I know I can change the starting time. I did this on the rsnapshot plugin too. I can look at checking the error codes (https://borgbackup.readthedocs…general.html#return-codes)

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi,

    Just started to use BorgBackup last week, and I have the same 'complain' on email spamming. . I was using rsync with scheduled jobs before, and could manage which job would send me an email.

    In fact, I run multiple backups of my filesystems , but one is running every hour on a specific directory.
    No need to say that an email every hour is a bit annoying. Even if I understand all that was said before on crontab and other, I would really appreciate if I can disable this 'feature' on a specific backup.

    All that said, thanks for the plugin @ryecoaaron

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

    • Offizieller Beitrag

    borgbackup 6.1.0 in the repo now. It will still email you if there is an error. You will not be able to disable that but I don't think errors should be skipped.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • borgbackup 6.1.0 in the repo now. It will still email you if there is an error. You will not be able to disable that but I don't think errors should be skipped.

    I'm using OMV 5 anyway ;)
    But I'm still thinking that a little checkbox for emailing in the WebUI in the archive configuration interface could be a nice improvment ;)

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

    • Offizieller Beitrag

    But I'm still thinking that a little checkbox for emailing in the WebUI in the archive configuration interface could be a nice improvment

    That is what the change was but I'm not backporting to OMV 5.x.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!