更新时间:2023-12-04 20:18:52
只需创建另一个cron:
Just create another cron:
0 3 * * * find $HOME/db_backups -name "db_name*.sql" -mtime +30 -exec rm {} \; >> $HOME/db_backups/purge.log 2>&1
它将查找所有早于30天的备份并将其删除.
It will find all backups older than 30 days and delete them.