Command to backup databases and place in a timestamped directory.
Use --link <mariadb container name>:mariadb
to automatically specify the required variables.
Or alternatively specify the individual variables:
DATABASE_HOST
= IP / hostname of MariaDB / MySQL server.DATABASE_PORT
= TCP Port of MariaDB / MySQL service.DATABASE_USER
= Administrative user eg root with DUMPDB privileges.DATABASE_PASS
= Password of administrative user.
BACKUP_DIR
backup location
<databases>...
name of database(s) to dump. If not specified all databases will be dumped.
docker run --rm -t -i --link myserver:mariadb -e BACKUP_DIR=/data -v /mnt/backup:/data docker.io/panubo/mariadb-toolbox:1.6.0 backup db1 db2