定时任务删除30天前的备份文件
#!/bin/sh
# 删除db、middlware过期备份
db_backup_dir=/mnt/backup/db
middleware_backup_dir=/mnt/backup/middleware
find $db_backup_dir -mtime +30 -name "*.tar.bz2" -exec rm -rf {} \;
find $middleware_backup_dir -mtime +30 -name "*.tar.bz2" -exec rm -rf {} \;
Comments | NOTHING