时间:2021-07-01 10:21:17 帮助过:83人阅读
#!/bin/bash
PASSWORD=ks4QrUhgmH6XZvE1hY1Q
/usr/local/mysql/bin/mysqldump -uroot -p$PASSWORD \
--master-data=2 --all-databases | gzip > /backup/db_`date +%Y%m%d%H%M`.sql.gz
find /backup/ -ctime +10 -exec rm -f {} \;
mysql全库备份
标签:111