Rsync notifications- how to have just backup ok/not ok notifications via e-mail?

  • Hi


    We manage some omv rsync backups and every morning we check for emails notifications about backups happened in the night.

    Emails notifications work fine but we receive a lot of emails about everything about backups and this makes email managing difficult.

    There is a way to let system just send us basic emails about backup gone well/not well.

    So what we don't need is continuous email update (like one mail/minute) about incremental speed etc.

    With "send command output via email" ON we receive all of this mentioned before but w/o this we don't receive anything at all.


    Thanks for your help

  • Hello.


    I managed it this way:

    Code
    if [ $? -eq 0 ]
    then
    echo "rsync backup completed successfully @ $(date) for $(hostname)" | s-nail -s "rsync finished @ $(date) for $(hostname)" -a /var/log/rsync.txt MyPersonal@mail.com
    else
    echo "rsync backup FAILED @ $(date) for $(hostname)" | s-nail -s "rsync FAILED @ $(date) for $(hostname)" -a /var/log/rsync.txt MyPersonal@mail.com
    fi


    I found this here.


    And after a tip of macom here, I got it sorted with s-nail and attachment.


    And it works for me :)

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

Jetzt mitmachen!

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