mirror of
https://github.com/fccview/cronmaster.git
synced 2026-01-28 23:51:33 -05:00
13 lines
443 B
Bash
13 lines
443 B
Bash
# @id: clean-old-backups
|
|
# @title: Clean old backups
|
|
# @description: Remove backup files older than 30 days
|
|
# @category: File Operations
|
|
# @tags: backup,cleanup,maintenance
|
|
|
|
# Clean old backups
|
|
# Remove backup files older than 30 days
|
|
|
|
BACKUP_DIR="/backup"
|
|
find "$BACKUP_DIR" -name "*.sql" -type f -mtime +30 -delete
|
|
find "$BACKUP_DIR" -name "*.tar.gz" -type f -mtime +30 -delete
|
|
find "$BACKUP_DIR" -name "backup_*" -type f -mtime +30 -delete |