From dce1d56dc9f0094176c70fa71fb29db5c128da68 Mon Sep 17 00:00:00 2001 From: Naum Soloveychik Date: Fri, 10 Jan 2020 22:33:20 +0300 Subject: [PATCH] 1 --- README.md | 4 ++-- mysql_backup.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 34832af..196f2cb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Feature rich MySQL / MariaDB backup script. ## Example -**Usage:** `mysql_backup.sh -d /backup/dir/ -n daily [-c 10 -s -a -e test@domain.org]` +**Usage:** `mysql_backup.sh -d /backup/dir/ -n daily [-c 10 -s -z -e test@domain.org]` ## Options @@ -30,7 +30,7 @@ compress dump using gzip ## Setup script in crontab -`20 01 * * * root /bin/sh /path/to/mysql_backup.sh -d /backup/dir/ -n daily -c 10 -e admin@email.com -a` +`20 01 * * * root /bin/sh /path/to/mysql_backup.sh -d /backup/dir/ -n daily -c 10 -e admin@email.com -z` ## .my.cnf example diff --git a/mysql_backup.sh b/mysql_backup.sh index 158088f..7aa249c 100644 --- a/mysql_backup.sh +++ b/mysql_backup.sh @@ -49,7 +49,7 @@ while [ "$1" != "" ]; do -s | --single-transaction ) singletrans=1 ;; - -z | --compress ) archive=1 + -z | --compress ) compress=1 ;; -q | --quiet ) quiet=1 ;; @@ -152,10 +152,10 @@ dump_file_name="${dir}/mysqldump.${name}.${date}.sql" ; mysqldump ${mysqlparams} > ${dump_file_name} ; -if [ "${archive}" ] ; then +if [ "${compress}" ] ; then if [ ! "${quiet}" ] ; then - echo "Archiving dump (`date +\"%Y-%m-%d %H:%M:%S\"`)..." ; + echo "Compressing dump (`date +\"%Y-%m-%d %H:%M:%S\"`)..." ; fi gzip ${dump_file_name} ;