时间:2021-07-01 10:21:17 帮助过:26人阅读
date_str=`date +%Y%m%d`cd /data2/backupmysqldump -h localhost -u oschina --password=xxxx -R -E -e \ --max_allowed_packet=1048576 --net_buffer_length=16384 mydb\ | gzip /data2/backup/mydb_$date_str.sql.gz
date_str=`date +%Y%m%d` cd /data2/backup mysqldump -h localhost -u oschina --password=xxxx -R -E -e \ --max_allowed_packet=1048576 --net_buffer_length=16384 mydb\ | gzip > /data2/backup/mydb_$date_str.sql.gz