https://github.com/katharostech/docker_mysql-backup
Docker image for backing up a MySQL database
https://github.com/katharostech/docker_mysql-backup
Last synced: 4 months ago
JSON representation
Docker image for backing up a MySQL database
- Host: GitHub
- URL: https://github.com/katharostech/docker_mysql-backup
- Owner: katharostech
- License: unlicense
- Created: 2019-07-09T19:03:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-10T16:46:21.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T09:04:24.228Z (about 2 years ago)
- Language: Dockerfile
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Mysql Backup
[](https://cloud.drone.io/katharostech/docker_mysql-backup)
Extreemly simple Mysql backup container that simply dumps all Mysql databases to a file on a cron schedule.
## Usage
```
docker run -v backup-volume:/backup katharostech/mysql-backup
```
The backup will be written to `/backup/db-backup.sql.gz`. Backups will be run on the `CRON_SCHEDULE` and will replace the previously taken backup at each run.
## Environment Variables
### `CRON_SCHEDULE`
**Default:** `0 0 * * *`
### `INIT_BACKUP`
Set to `true` to do a backup when the container is started.
**Default:** `false`
### `MYSQL_HOST`
**Default:** mysql
### `MYSQL_PORT`
**Default:** `3306`
### `MYSQL_USER`
**Default:** `root`
### `MYSQL_PASSWORD`
**Default:** `password`
### `FAILURE_HOOK`
This allows you to insert a command will be run when a backup fails. You can use this to trigger a `curl` on a webhook to your chat software or something similar.
**Default:** `true`