rsnapshot - email - deaktivieren

    • Offizieller Beitrag

    I can't find anything in the plugin that tells it to email you. So, I'm not sure how to deactivate it.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • Nichts für ungut, aber diese Antwort habe ich mir schon selber gegeben.
    Ich weiß nicht wer oder von was diese mail verschickt wird (ich mein den Prozess/Dienst).


    Ich werde auf jedenfall Stündlich mit ner Email-versorgt --> nerft ziemlich.


    Gruß Tom


    No offense, but this answer I have already given myself. I do not know who or what this mail is sent (I mean the process / service). I will definitely Hourly with ner Email supplied

  • You only get an e-mail if there was an error in your backup job. Correct your job and then you will not get one. The e-mail has to do with the service and not the plugin. If you want to get an e-mail notifying you that a job was successful you need to add a line to the .conf file.

  • Ok,
    this is the last mail that i got from OMV



    Could you tell me where is the problem ß


    Tom

    • Offizieller Beitrag
    Zitat von "Tom1976"

    No offense, but this answer I have already given myself.


    Not really. I was telling you there is nothing in the plugin I can change to make it stop emailing you.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • I had this same problem and I just figured it out! Took me a while, but now it seems to be the solution.
    Got the solution from this post on the forum.. Also check these links to understand more.
    http://www.cyberciti.biz/faq/d…alert-by-crontab-command/
    http://www.mydigitallife.info/…n-devnull-21-and-devnull/


    To disable the constant emailing from rsnapshot every time a backup is run do this:
    SSH into your OMV as root.


    Code
    # cd /etc/cron.d
    # nano openmediavault-rsnapshot


    Now you are in the nano text editor. The file should look something like this:


    Code
    # This is the cron file for openmediavault-rsnapshot.
    # The file /var/lib/openmediavault/cron.d/rsnapshot will mirror
    # the jobs that are configured in the plugin.
    # m h           dom mon dow user  command
    5 *         * * *           root    /var/lib/openmediavault/cron.d/rsnapshot hourly
    30 3        * * *           root    /var/lib/openmediavault/cron.d/rsnapshot daily
    0  3        * * 1           root    /var/lib/openmediavault/cron.d/rsnapshot weekly
    30 2        1 * *           root    /var/lib/openmediavault/cron.d/rsnapshot monthly
    30 2            1 1 *                   root    /var/lib/openmediavault/cron.d/rsnapshot yearly


    just add the following on a new line at the end of the file

    Code
    >/dev/null


    press ctrl+O to save, then enter, then ctrl+X to exit
    I also followed up with this command, but it might not be needed.


    Code
    # /etc/init.d/cron restart


    Now you should only receive an email if there is an error, instead of an email every time a backup is run. use >/dev/null 2>&1 if you never want an email.
    Maybe someone smarter than I can verify that this is the best way to do this.

  • Hi gang, don't want to take over this thread but I get and email from monitoring which indicates it cannot find rsnapshot but rsnapshot isnt installed.


    Is there a way to fix this?


    Here is the error message.


    Subject: Cron <root@openmediavault> /var/lib/openmediavault/cron.d/rsnapshot hourly (failed) [openmediavault]
    To: <*******@gmail.com>
    Cc:


    /bin/sh: /var/lib/openmediavault/cron.d/rsnapshot: not found


    Thanks inadvance,

  • The rsnapshot emails were driving me mad. I got them every hour even though I don't have an hourly backup set. I got them even when my backup configs were not enabled. I got them even when I deleted my backup configs. It took totally uninstalling rsnapshot to get rid of the email bombardment. Not sure why it is doing this. Amusingly, I was getting confirmation emails telling me my backup had successfully completed when the hard drive was no longer mounted in OMV and was totally disconnected from the sata port and I had deleted the backup config. How on earth was it successfully completing a backup when there was no hardware or config file for the backup?

  • Hi!


    I also tried exo's suggestion. However, with his "solution" rsnapshot stopped working at all - no new snapshots were being made. Probably one should add ">/dev/null" to the end of each command line, like so:

    Code
    # This is the cron file for openmediavault-rsnapshot.
    # The file /var/lib/openmediavault/cron.d/rsnapshot will mirror
    # the jobs that are configured in the plugin.
    # m h           dom mon dow user  command
    5 *         * * *           root    /var/lib/openmediavault/cron.d/rsnapshot hourly >/dev/null
    30 3        * * *           root    /var/lib/openmediavault/cron.d/rsnapshot daily >/dev/null
    0  3        * * 1           root    /var/lib/openmediavault/cron.d/rsnapshot weekly >/dev/null
    30 2        1 * *           root    /var/lib/openmediavault/cron.d/rsnapshot monthly >/dev/null
    30 2            1 1 *                   root    /var/lib/openmediavault/cron.d/rsnapshot yearly >/dev/null

    ?


    I wonder what the opinion of our experts is...?


    Best,
    Aiakos

    • Offizieller Beitrag

    The cron file has never needed /dev/null at the end before. Does it work now by adding /dev/null?

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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 cron file has never needed /dev/null at the end before. Does it work now by adding /dev/null?


    But that's what exo suggested?!


    I tried it like I suggested above, with ">/dev/null" at the end of each line and so far it seems as rsnapshot is still working. The daily backup last night worked and I did not receive an e-mail. Now I need to test if I receive an e-mail if there is an error. I'll keep you informed...

    • Offizieller Beitrag

    But that's what exo suggested?!


    I tried it like I suggested above, with ">/dev/null" at the end of each line and so far it seems as rsnapshot is still working. The daily backup last night worked and I did not receive an e-mail. Now I need to test if I receive an e-mail if there is an error. I'll keep you informed...


    I understand that is what was suggested but I don't understand why it is needed after all this time. I have been using this plugin on multiple systems for a long time with no problems without that change. Piping stdout to /dev/null is just masking the problem. I think you should send stdout and stderr to a file to see why it is failing.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • I did not unlock the the LUKS drive last night to provoke an error in order to test the redirection to /dev/null. As expected, I received an e-mail with the error message. Thus, for the time being I will use the redirection to /dev/null since it suppresses the e-mail if there were no errors.


    With the device unlocked, I used

    Code
    /var/lib/openmediavault/cron.d/rsnapshot daily 2>&1

    in the cron file to receive stdout and stderr via email, in order to test if there is an output in stderr. The result looks like always:


    I have no reason to believe that there are any errors. There are no error messages and the snapshots work fine as far as I can tell. I understand that you think that this email is only send in case of an error, but apparently there is a number of users who get the e-mail although everything seems to be fine...

    • Offizieller Beitrag

    Ah that is the "problem". You are supposed to get the email every time it is run. The rsync plugin works the same way. By sending the stdout to /dev/null, you won't get an email unless it errors. I guess I can make that an option in the plugin.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • At least as far as I am concerned that would be great. I do not want to get a notification every day or even hourly, just to tell me that everything is fine. For me it is sufficient if I get notified if something's wrong. For now I configured the cron file such that hourly and daily backups are quiet (>/dev/null) while weekly and monthly runs still send an e-mail. This way I get the "everything is okay" e-mail only once a week. ;)

  • Hello


    Ah that is the "problem". You are supposed to get the email every time it is run. The rsync plugin works the same way. By sending the stdout to /dev/null, you won't get an email unless it errors. I guess I can make that an option in the plugin.

    Yes, that would be great.


    I work in the aviation industry and there the philosophy is a lights out cockpit. No Warning-Light -> no Problem.
    With the default setting of this plugin, I get an email every hour and I delete them without reading. If there would be a problem, I would not notice.


    I see two possible solutions for this problem:
    a)

    Code: /var/lib/openmediavault/cron.d/rsnapshot
    5 *         * * *           root    /var/lib/openmediavault/cron.d/rsnapshot hourly >/dev/null


    here all non-error messages are discarded


    or
    b)

    Code: /var/lib/openmediavault/rsnapshot.d/rsnapshot-xyz.conf
    verbose         2
    loglevel        2

    Here warnings will also be sent.


    The problem with the second option is, that the script /var/lib/openmediavault/cron.d/rsnapshot itself does produce output like this:

    Code
    Checking access rights on target directory structure ...
    ... /media/a8af3832-48c7-4568-861f-e80380dd7e0b/Backups/rsnapshot//media/a8af3832-48c7-4568-861f-e80380dd7e0b/Dokumente
    ... /media/a8af3832-48c7-4568-861f-e80380dd7e0b/Backups/rsnapshot//media/a8af3832-48c7-4568-861f-e80380dd7e0b
    ... /media/a8af3832-48c7-4568-861f-e80380dd7e0b/Backups/rsnapshot//media
    starting daily backup for 00cab93d-d721-4d00-b765-d13675c5dc7d


    And this will still be sent to the user by cron. So, this second option would also require changes in this file (it should not produce any output unless something goes wrong). --> comment out all "echo" lines.


    By the way: this script always returns "Backups finished". Even if rsnapshot failed, right?



    It would be great if you would include this (I suggest as a default) in the plugin.
    I have created a pull-request:
    https://github.com/OpenMediaVa…iavault-rsnapshot/pull/15


    Another option I did try was to add the "-q" parameter as rsnapshot option in the webinterface of the plugin. This did not help, as it did not arrive in the /var/lib/openmediavault/cron.d/rsnapshot (is this a bug?)


    Greetings,
    Hendrik

Jetzt mitmachen!

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