HEX
Server: Apache
System: Linux vmi2872685.contaboserver.net 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: computingcore (1007)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: //02-db-backup/cleanup.sh
#!/bin/bash

# Define the folder path
BACKUP_DIR="/02-db-backup"

# Find and delete .sql files older than 10 days
find "$BACKUP_DIR" -name "*.sql" -type f -mtime +10 -exec rm -f {} \;

# Log the action (optional)
echo "Deleted .sql files older than 1 day from $BACKUP_DIR on $(date)" >> /var/log/backup_cleanup.log