Bash script for create MySQL/PostgreSQL, Docker and files dump and upload them via to WebDAV server.
-
Create
config.sh
andinclude.list
files -
Add
crontab -e
config:
MAILFROM=backup@example.ru
MAILTO=user@example.ru
0 3 * * * /paht/to/repository/run.sh
- Install
apt-get install ssmtp
and create/etc/ssmtp/ssmtp.conf
:
root=backup@example.ru
mailhub=smtp.yandex.ru:465
AuthUser=backup@example.ru
AuthPass=your-password-here
AuthMethod=LOGIN
FromLineOverride=NO
UseTLS=YES
/etc/ssmtp/revaliases
:
root:backup@example.ru:smtp.yandex.ru:465