Add purgedbbackups.sh

Purge database backups created before any search and replace operation older than 7 days. This script will run daily via cron at midnight
main
jay 2023-11-17 03:53:42 +00:00
parent e2cf733d47
commit 90d76defe0
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#!/bin/bash
# Set the path to the folder
backup_path="/var/www/webroot/mightybox-search-replace-db/db-backup"
# Locate backup files older than 7 days and delete them
find $backup_path -type f -mtime +7 -exec rm {} \;