Created
June 22, 2025 14:29
-
-
Save maneer17/a89791cc1cfcca7d27d489a87f38522c to your computer and use it in GitHub Desktop.
Clean Old Database backup files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BACKUP_DB_DIR="/moodle-db-backups" | |
find "$BACKUP_DB_DIR" -type f -name "*.sql" -mtime +3 -delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 22 * * * /home/manar/clean-old-db-files.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment