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 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • 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 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • 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.

  • 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 5.6.6 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.1
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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.

  • 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 5.6.6 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.1
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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

    Added the Label resolved
  • 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 5.6.6 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.1
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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?

  • 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.

  • 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 5.6.6 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.1
    omv-extras.org plugins source code and issue tracker - github


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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!