Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting Email Notification #364

Open
ShlomiPorush opened this issue Aug 14, 2024 · 2 comments
Open

Not getting Email Notification #364

ShlomiPorush opened this issue Aug 14, 2024 · 2 comments
Labels

Comments

@ShlomiPorush
Copy link
Contributor

Summary

Hi, for some reason I don't receive an email after the backup is complete.
i dont see any error in logs

Relevant logs and/or screenshots

My docker compose file with the relevant part of the alerts

version: '3'
services:
  db-backup:
    image: tiredofit/db-backup
    environment:
      # Notifications
      - ENABLE_NOTIFICATIONS=TRUE
      - NOTIFICATION_TYPE=EMAIL
      # Email
      - MAIL_FROM=${MAIL_FROM}
      - MAIL_TO=${MAIL_TO}
      - SMTP_HOST=${SMTP_HOST}
      - SMTP_PORT=25

Logs

2024-08-14 12:00:00 IDT [notice] Found PRE_SCRIPT environment variable. Executing '/scripts/mysql-pre-script.sh
2024-08-14 12:00:00 IDT [notice] Dumping MySQL/MariaDB database: '*****' and compressing with 'gzip'
2024-08-14 12:00:02 IDT [debug] DB Backup exit Code is 0
2024-08-14 12:00:02 IDT [info] DB Backup of '******_20240814-120000.sql.gz' completed successfully
2024-08-14 12:00:02 IDT [notice] Backup of '******_20240814-120000.sql.gz' created with the size of 6651723 bytes
2024-08-14 12:00:02 IDT [debug] Moving backup to filesystem
2024-08-14 12:00:02 IDT [debug] Move exit Code is 0
2024-08-14 12:00:02 IDT [debug] Moving of backup '********_20240814-120000.sql.gz' completed successfully
2024-08-14 12:00:02 IDT [notice] Found POST_SCRIPT environment variable. Executing '/scripts/mysql-post-script.sh
2024-08-14 12:00:03 IDT [notice] DB Backup for '******' time taken: Hours: 0 Minutes: 00 Seconds: 02
2024-08-14 12:00:03 IDT [info] Cleaning up old backups on filesystem

Environment

Docker on ubuntu server

@beyerleinf
Copy link

(not a contributor) but I got caught out by that as well. From the code, (I think) it's only sending a notification if the backup failed and it seems intentional.

@rltas
Copy link

rltas commented Sep 6, 2024

Some way to test this would be great, either an option to send a mail on success too, or a cli command in the container or whatever. I can tell that echo Test | sendmail -f noreply@mydomain.net me@mydomain.net works but who knows if that's also true for the notifications.
One simple way to test it by provoking an error is to set the /backup mount to ro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants