Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 836 Bytes

backup.md

File metadata and controls

28 lines (17 loc) · 836 Bytes

Backup databases

Command to backup databases and place in a timestamped directory.

Environment Configuration

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.

Environment Options

  • BACKUP_DIR backup location

Options

  • <databases>... name of database(s) to dump. If not specified all databases will be dumped.

Example

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