-sharp!/bin/bash
file_name2=`date +%Y%m%d%H%M%S`
mkdir /home/sql_bak/user_bak/$file_name2
chmod 7777 /home/sql_bak/user_bak/$file_name2
-sharp-sharp-sharp-sharp
arr_string=(users payrecord_fruitcoin yamirecord vipexam_record stream_order ios_pay)
for data in ${arr_string[@]}
do
mysqldump -hrm-&&&&&&com -ubi&&&&&&jy -pZho&&&&&9xx 2>/dev/null --set-gtid-purged=off ${data} > /home/sql_bak/user_bak/$file_name2/${data}.sql
done
above is the backup script. If executes the script manually, the backup can be successful .
but.
all the files backed up by joining scheduled tasks are empty .
the figure is as follows:
results of manual backups
..]
:
: