Skip to content

Commit

Permalink
refresh readme
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed May 11, 2024
1 parent c492eda commit ae4507c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# mysqldump

## Description

This Docker image provides the `mysqldump` command. Generally, this command is bundled with MySQL Server, and you might not always want to install MySQL on the server that needs to do the backups. So this is a nifty way to run `mysqldump` without installing anything. Furthermore, it avoids warnings in output!

## Usage

Use docker env to configure the ``~/.my.cnf`` file used by mysqldump.
Environment values required:

* `MYSQL_USER`
* `MYSQL_PASSWORD`
* `MYSQL_HOST`
* `MYSQL_PORT` (optional if default)
* `your-database-name`

Example:

~~~bash
docker run --rm -e MYSQL_USER=your-mysql-user -e MYSQL_PASSWORD=your-passowrd -e MYSQL_HOST=your-mysql.example.com -e MYSQL_PORT=3306 -v $(pwd):/out ghcr.io/deltablot/mysqldump -r /out/dump.sql your-database-name
docker run --rm -e MYSQL_USER=your-mysql-user \
-e MYSQL_PASSWORD=your-passowrd \
-e MYSQL_HOST=your-mysql.example.com \
-e MYSQL_PORT=3306 \
-v $(pwd):/out ghcr.io/deltablot/mysqldump -r /out/dump.sql your-database-name
~~~

0 comments on commit ae4507c

Please sign in to comment.