Linux下MySQL自动备份 Edited on 2024-07-17 In DB 删除 30天前的备份编辑 vim 1234echo '#!/bin/bash' > /opt/mysql8/dump_limit.shecho 'find /opt/mysql8/dump/ -type f ! -newermt "30 days ago" -delete' >> /opt/mysql8/dump_limit.shchmod u+x /opt/mysql8/dump_limit.sh 同样的 1crontab -e 输入 10 0,12 * * * /opt/mysql8/dump_limit.sh 本文地址: https://github.com/maxzhao-it/blog/post/3ed7094534213/