Skip to content

Commit 1eab9d8

Browse files
committed
update
1 parent c38ef63 commit 1eab9d8

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# Docker-mysql-backup-azure
22

3-
mysql container to backup your database's to Microsoft Azure Storare
3+
container to backup your mysql database's to Microsoft Azure Storare.
44

5-
# Variables you must define when you run the container
5+
# Environment variables
66

7-
- `$DB_PASSWORD` - The password to connect with Mysql
8-
- `$DB_USER` - The username to connect with Mysql
9-
- `$DB_NAME` - Database name
10-
- `$CONTAINER` - Container name in azure
11-
- `$AZURE_STORAGE_ACCOUNT` - Name of Azure Storare Account
12-
- `$AZURE_STORAGE_ACCESS_KEY` - Acess Key for Storage Account
13-
- `$MYSQL_PORT` - Port to connect with Mysql. default 3306
14-
- `$MYSQL_HOST` - Host where mysql is running
15-
- `$FILENAME` - Name to file in Azure Storage. Default name default-date +"%Y-%m-%d_%H-%M"`
16-
output will be `default-2015-08-03_17-58`
7+
- _`$DB_PASSWORD`_ - The password to connect with Mysql
8+
- _`$DB_USER`_ - The username to connect with Mysql
9+
- _`$DB_NAME`_ - Database name
10+
- _`$CONTAINER`_ - Container name in azure
11+
- _`$AZURE_STORAGE_ACCOUNT`_ - Name of Azure Storare Account
12+
- _`$AZURE_STORAGE_ACCESS_KEY`_ - Acess Key for Storage Account
13+
- _`$MYSQL_PORT`_ - Port to connect with Mysql. default 3306
14+
- _`$MYSQL_HOST`_ - Host where mysql is running
15+
- _`$FILENAME`_ - Name to file in Azure Storage. Default name `default-date +"%Y-%m-%d_%H-%M"` output example `default-2015-08-03_17-58`
16+
17+
# Container startup explained
18+
19+
* Mysql will acess to the host where is database you want to backup
20+
* Mysql will dump the database to this container and compress it using gzip
21+
* Using azure-cli the file will be uploaded to Azure Storage
22+
* Container will exit
1723

1824
# Example of running
1925

@@ -30,3 +36,13 @@ docker run -rm --name mysql-backup \
3036
fernandoneto/docker-mysql-backup-azure
3137

3238
```
39+
40+
This will upload to Azure Stora a file named `default-2015-08-04_09-47.sql.gz`
41+
42+
## Developing
43+
44+
### Building image
45+
46+
```bash
47+
docker build -t fernandoneto/docker-mysql-backup-azure .
48+
```

0 commit comments

Comments
 (0)