fix: replace deprecated mysql backup image with modern cron backup container
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m5s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m5s
- The 'databack/mysql-backup' image crashes immediately when used in a pure cron context without legacy arguments and is incompatible with MySQL 8 caching_sha2_password. - Switched to the actively maintained 'fradelg/mysql-cron-backup' image. - Re-mapped environment variables to match the new image expectations (MYSQL_HOST, CRON_TIME, MAX_BACKUPS). - Updated volume mapping destination to '/backup' as expected by the new image.
This commit is contained in:
@@ -44,15 +44,17 @@ services:
|
||||
- fasto-net
|
||||
|
||||
backup-mysql:
|
||||
image: databack/mysql-backup
|
||||
image: fradelg/mysql-cron-backup
|
||||
restart: always
|
||||
environment:
|
||||
DB_SERVER: db
|
||||
DB_USER: root
|
||||
DB_PASS: ${DB_PASSWORD:-root_password}
|
||||
DB_DUMP_CRON: "55 2 * * *" # Roda todo dia exatamente às 02:55 da manhã
|
||||
DB_CLEANUP_TIME: 4320 # Apaga os locais mais velhos que 3 dias
|
||||
MYSQL_HOST: db
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASS: ${DB_PASSWORD:-root_password}
|
||||
CRON_TIME: "55 2 * * *" # Roda todo dia exatamente às 02:55 da manhã
|
||||
MAX_BACKUPS: 3 # Mantém apenas os 3 últimos dias
|
||||
INIT_BACKUP: "1" # Faz um backup imediatamente ao ligar o container
|
||||
volumes:
|
||||
- /opt/backups_db:/db
|
||||
- /opt/backups_db:/backup
|
||||
networks:
|
||||
- fasto-net
|
||||
|
||||
|
||||
Reference in New Issue
Block a user