mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 13:39:41 +01:00
Update README.md
This commit is contained in:
23
README.md
23
README.md
@@ -245,29 +245,6 @@ services:
|
||||
- DB_PASSWORD=password
|
||||
```
|
||||
|
||||
## Manual
|
||||
> backup_script.sh
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
DB_USERNAME='db_username'
|
||||
DB_PASSWORD='password'
|
||||
DB_HOST='db_hostname'
|
||||
DB_NAME='db_name'
|
||||
BACKUP_DIR='/some/path/backup/'
|
||||
|
||||
docker run --rm --name mysql-bkup -v $BACKUP_DIR:/backup/ -e "DB_HOST=$DB_HOST" -e "DB_USERNAME=$DB_USERNAME" -e "DB_PASSWORD=$DB_PASSWORD" jkaninda/mysql-bkup:latest bkup -o backup -d $DB_NAME
|
||||
```
|
||||
|
||||
```sh
|
||||
chmod +x backup_script.sh
|
||||
```
|
||||
|
||||
Your crontab looks like this:
|
||||
|
||||
```conf
|
||||
0 1 * * * /path/to/backup_script.sh
|
||||
```
|
||||
|
||||
## Kubernetes CronJob
|
||||
For Kubernetes you don't need to run it in scheduled mode.
|
||||
|
||||
Reference in New Issue
Block a user