How can you silence the hourly Cron email from Rsnapshot

    • OMV 2.x
    • How can you silence the hourly Cron email from Rsnapshot

      I have tried adding the long argument --quiet to the options in rsnapshot but this hasn't silenced the hourly snapshot cron emails. Is there any options i'm missing to choose when to receive these reports.

      Thanks

      M Chappell (OMV noob, Coming from FreeNas)
    • What version are you using? I thought I fixed that in the latest version.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      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!
    • chappell101 wrote:

      OMV 2.1.13 64Bit - Rsnapshot 1.0.11 - Kernel 3.2.0-4-amd64

      Create a new job and then delete it. The config files probably just need to be rewritten and updating the plugin doesn't do that.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      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!
    • Source Code

      1. #!/bin/bash
      2. if [ -z "$1" ]; then
      3. echo "No argument given. Should be one of: hourly,daily,weekly,monthly,yearly. UUID of backup job can be passed as second argument to execute a single job."
      4. exit 1
      5. fi
      6. mail=false
      7. # backup /media/b3d3d767-e4a3-47e0-a88a-102b853ae0e2/SLSZ-Storage/ to /media/b3d3d767-e4a3-47e0-a88a-102b853ae0e2/SLSZ-Backup/
      8. skip=false
      9. if [ "$2" = "14ee45d8-1443-4d24-b2b6-77c2a05b1e26" ] || ([ -z "$2" ] && [ $skip = false ]); then
      10. targetdir="/media/b3d3d767-e4a3-47e0-a88a-102b853ae0e2/SLSZ-Backup//SLSZ/SLSZ-Storage/"
      11. if [ ! -e "${targetdir}" ]; then
      12. echo "Creating target directory structure ... "
      13. mkdir -p "${targetdir}"
      14. fi
      15. echo "Checking access rights on target directory structure ... "
      16. while [ -n "${targetdir}" ] && [ "${targetdir}" != "/media/b3d3d767-e4a3-47e0-a88a-102b853ae0e2/SLSZ-Backup/" ]; do
      17. echo "... ${targetdir}"
      18. chmod 2775 "${targetdir}"
      19. chgrp users "${targetdir}"
      20. targetdir="${targetdir%/*}"
      21. done
      22. mail=true
      23. echo "starting $1 backup for 14ee45d8-1443-4d24-b2b6-77c2a05b1e26"
      24. /usr/bin/rsnapshot -c "/var/lib/openmediavault/rsnapshot.d/rsnapshot-14ee45d8-1443-4d24-b2b6-77c2a05b1e26.conf" "$1"
      25. fi
      26. if [ $mail = true ]; then
      27. echo "Backups finished."
      28. fi
      Display All

      The post was edited 1 time, last by chappell101 ().

    • I guess I didn't read your first post very well. It is doing exactly what it is supposed to. I guess I need to add a checkbox to enable/disable email output. Let me look into that.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      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!
    • Yes please, need to be able to disable non-error notifications

      I'm getting a ton of non-error cron notifications every day. Definitely add my vote to that, please can you see if it's possible to prevent it sending if the jobs finished cleanly? Hard to make use of notifications if the errors are buried in a ton of similar emails that don't need any action.
    • I messed with many things to prevent the emails. People starting thinking I had a mistress named "Cron Daemon" considering I got emails from "her" 8 times a day.

      The rsnapshot configuration file is rsnapshot.conf located in directory /etc/ will contain the following lines plus many others.

      # Verbose level, 1 through 5.
      # 1 Quiet Print fatal errors only
      # 2 Default Print errors and warnings only
      # 3 Verbose Show equivalent shell commands being executed
      # 4 Extra Verbose Show extra verbose information
      # 5 Debug mode Everything
      #
      verbose 2

      For me the default was set to verbose 3 which prints everything from the shell commands. This is picked up by cron and sent by email to me. Setting this to 2 fixed the issue and now I only get errors.

      I also messed with other things but this is the last thing I changed before the infernal emails stopped. I had to make custom rsnapshot calls not using the rsnapshot plugin so this might not work for you, but I hope it helps.
      'Even a blind squirrel finds a nut once in a while'