mirror of
https://github.com/fccview/cronmaster.git
synced 2026-04-23 23:50:42 -04:00
12 lines
395 B
Bash
Executable File
12 lines
395 B
Bash
Executable File
# @id: clear-backups
|
|
# @title: Clear backups
|
|
# @description: Clears old backups after a successful job
|
|
|
|
#!/bin/bash
|
|
# 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 |