Update backup.sh

+ add flag exclude data tables
+ add chmod and chown operation with sql dump and compresed files
This commit is contained in:
mirocow 2015-12-14 14:48:35 +04:00
parent 8e0a123074
commit 0fa72501bf

View file

@ -124,7 +124,7 @@ backup()
for TABLE in $(mysql --defaults-extra-file=$CONFIG_FILE --skip-column-names -B $BDD -e "$query" | egrep -v "$tables_exclude_expression"); do
f_log " ** Dump $BDD.$TABLE"
if [ `echo $data_tables_exclude_expression| grep $TABLE` ]; then
if [ $(echo $data_tables_exclude_expression| grep $TABLE) ]; then
f_log "Exclude data from table $TABLE"
continue
fi