This image is responsible for running the mysqldump command for one or multiple MySQL/MariaDB schemas.
The commands are set to run as a cron job every day at 03:00am and store the files under the path /db-dumps. Also, dump files older than 10 days are automatically deleted.
The files as being stored with the filename pattern: schema-dump-date.sql.
In order to use it the following env variables must be set:
An example of a Docker Compose configuration is the following:
mariadb-backup:
image: imousmoutis/mysql-dump:0.0.5
container_name: mariadb-backup-container
environment:
DB_HOST: mariadb-server
DB_PORT: 3308
DB_USER: root
DB_PASS: 0b50fee2-9c88-46ac-82a9-e39b9ed07f70
DB_SCHEMAS: schemaA,schemaB,schemaC
restart: unless-stopped
depends_on:
- mariadb-server
volumes:
- '/usr/src/app/db-dumps:/db-dumps'
- /etc/localtime:/etc/localtime
Content type
Image
Digest
Size
73.7 MB
Last updated
over 4 years ago
docker pull imousmoutis/mysql-dump:0.0.5