a simple mysqldump image for mysql mackup | dockerhub: uuz233/mysqldump
Key | Accept value | Description | Required |
---|---|---|---|
DB_USER | String | The user for mysql connection | True |
DB_PASS | String | The password for connect db | True |
DB_NAME | String | Name of database that want to backup | True [if missing ALLSERVER_BACKUP arg] |
ALLSERVER_BACKUP | True/False | backup the hole mysql server | True [if missing DB_NAME arg] |
OTHER_ARG | String | other argument that you want to add | false |
SLEEP | INT (second) | The time to want for doing next backup | true |
docker run --rm \
-e DB_HOST=mariadb-master-1 \
-e DB_USER=root \
-e DB_PASS=pass \
-e DB_NAME=db1 \
-e SLEEP=3600 \
-v ./backups:/backups
uuz233/mysqldump
Connect to DB root@mariadb-master-1 using password pass for backup db db1 and save the SQL file to ./backups
docker run --rm \
-e DB_HOST=mariadb-master-1 \
-e DB_USER=root \
-e DB_PASS=pass \
-e ALLSERVER_BACKUP=true \
-e SLEEP=3600 \
-v ./backups:/backups
uuz233/mysqldump
Connect to DB root@mariadb-master-1 using password pass for backup the hole server and save the SQL file to ./backups
docker run --rm \
-e DB_HOST=mariadb-master-1 \
-e DB_USER=root \
-e DB_PASS=pass \
-e ALLSERVER_BACKUP=true \
-e OTHER_ARG=--lock-tables=0 \
-e SLEEP=3600 \
-v ./backups:/backups
uuz233/mysqldump
Connect to DB root@mariadb-master-1 using password pass for backup the hole server and save the SQL file to ./backups. Using the arg --lock-tables=0
Welcome to contribute to this project in any way(pr,issues,etc.)
This project is under GPLv3