This tool provides a simple and powerful way to manage MySQL database backups and restores, specifically designed for containerized environments. It can be run as a lightweight container image or as a standalone binary, offering flexibility for various workflows. You can automate your entire backup process with extensive configuration options.
Key features include:
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: example_db
volumes:
- ./mysql-data:/var/lib/mysql
backup:
image: databacker/mysql-backup:latest
restart: always
depends_on:
- db
environment:
DB_SERVER: db
DB_USER: root
DB_PASS: ${MYSQL_ROOT_PASSWORD}
DB_NAMES: example_db
CRON_TIME: "0 0 * * *"
MAX_BACKUPS: 7
INIT_BACKUP: "true"
volumes:
- ./backups:/db_backupMYSQL_ROOT_PASSWORD=your_super_secret_passwordAuto-fetched about 3 hours ago
Auto-fetched about 3 hours ago