-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c492eda
commit ae4507c
Showing
1 changed file
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
~~~ |