-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplyfi logic around old backup deletion
Limit number of settings backup files to 45 and delete the oldest. Previously FPP was only checking if they were >90 days old before deleting which causes too many files being kept if lots of changes are made Include a shell script to clear out old backups just in cases (to avoid issues with 1000's of files)
- Loading branch information
Showing
3 changed files
with
73 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
##################################### | ||
|
||
BINDIR=$(cd $(dirname $0) && pwd) | ||
. ${BINDIR}/../../scripts/common | ||
|
||
#Purge any old backups, leaving 45 of the most recent files | ||
#This is a initial bypass of the backup script cleanup which may run out of memory if there are thousand of backups to delete | ||
if [ -d ${MEDIADIR}/config/backups ]; then | ||
cd ${MEDIADIR}/config/backups | ||
ls -tr | head -n -45 | xargs --no-run-if-empty rm | ||
fi |
This file contains 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
This file contains 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