Files
mysql_backup/README.md
Naum Soloveychik cd2c4b3f64 Update README.md
2020-01-10 21:50:17 +03:00

36 lines
777 B
Markdown

# MySQL backup shell script
MySQL backup shell script
Feature rich MySQL / MariaDB backup script.
## Usage
**Usage:** `mysql_backup.sh -d /var/backup -n daily [-c 10 -s -a -e test@domain.org]`
- **-d , --dir**
backup directory
- **-n, --name**
backup name
- **-c, --copies**
number of copies to store (default 10)
- **-e, --email**
notification email
- **-l, --lock-all-tables**
- **-s, --single-transaction**
- **-z, --compress**
compress dump by gzip
- **-q, --quiet**
- **-h, --help**
## Setup database password
Set database `user` and `password` to user that execute script using `.my.cnf` in user homedir.
## .my.cnf example
```
[client]
user = mysqldump
password = secret_passwd_here_HMnab4sBMmMwtDgvF=qZuuU#gsED9u6J
host = localhost
```