Rsync notification mail only on error

  • Hello,


    I have several rsync jobs with the --quiet option set in the interface. I've also choosen that the output is send me via mail when some output is generated.


    I expected to get only a mail when an error occures.
    Unfortunately in the rsync script of omv, there is a hard coded output:


    Zitat

    echo "Please wait, syncing <rsync://omv@storage.lan:/media/> to </media/e57601e6-f19b-427d-8ffb-88bd0ab135ed/media> ...\n"


    Because of this, I will get every run of rsync a mail, which this message inside.



    Is it possible to suppress this message to archieve the goal, to get only error mails from rsync?



    Thank you very much for your reply.

  • I fixed it for me with changing
    /usr/share/openmediavault/mkconf/rsync Line 117:

    Zitat von /usr/share/openmediavault/mkconf/rsync Line 117

    -o "echo \"Please wait, syncing <${srcuri}> to <${desturi}> ...\n\"" -n \

    to


    Zitat

    -o "echo \"Please wait, syncing <${srcuri}> to <${desturi}> ...\n\" > /dev/null" -n \


    This is a dirty hack - not really nice. hopefully there is a better solution.

  • Could you please communicate which file you have edited? Thanks


    The situation with USBbackup is the same. Every file is listed in the generated email. This can lead to a quite big email body. Sometimes they are to big for my email provider. A summary would be sufficient enough for me. Or a simple file attachment. Maybe I can modify the USB backup script similarly.


    Btw: This modification may be overwritten by the next update of OMV? Right?

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

    2 Mal editiert, zuletzt von cabrio_leo ()

Jetzt mitmachen!

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