Setup a mariadb slave server with automysqlbackup
Go to file
Paolo Asperti 989f283b6f
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
fix mysql custom parameters
2019-11-25 18:54:15 +01:00
.drone.yml fix docker build args 2019-11-25 15:22:37 +01:00
Dockerfile fix mysql custom parameters 2019-11-25 18:54:15 +01:00
LICENSE Initial commit 2019-11-23 16:53:22 +00:00
README.md added healthcheck 2019-11-24 17:33:44 +01:00
automysqlbackup first import 2019-11-23 19:00:26 +01:00
custom.cnf fix mysql custom parameters 2019-11-25 18:54:15 +01:00
docker-entrypoint.sh fix mysql custom parameters 2019-11-25 18:54:15 +01:00
healthcheck.sh added healthcheck 2019-11-24 17:33:44 +01:00
mysql.cnf support for multiple mariadb versions 2019-11-25 14:28:34 +01:00
sudoers fix sudoers 2019-11-24 10:50:11 +01:00

README.md

Build Status

docker-mariadb-backup-slave

Setup a mariadb slave server with automysqlbackup

Parameters

SERVER_ID

This is used to customize slave server ID. The default value is 33. You should use an unique ID for each server.

READONLY

When set to 1, the slave server is set as readonly. This is the default. If you set this variable to something different, the database will be read/write.

REPLICATE_DO_DB

This is used to specify a single database to backup. It is generally advised to set this variable to the database name you want to backup.

$ docker exec some-mariadb sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > /some/path/on/your/host/all-databases.sql

2019-11-24 10:57:24 0 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--log-basename=#' or '--relay-log=mysqld-relay-bin' to avoid this problem.