We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53b546e commit 8e19574Copy full SHA for 8e19574
scripts/backups.sh
@@ -152,7 +152,7 @@ function remove_files() {
152
mapfile -t all_files < <(find "${MYBASEDIR}" -type f -printf "%T@ %p\n" | sort -nr | cut -d' ' -f2-)
153
mapfile -t old_files < <(find "${MYBASEDIR}" -type f -mmin +${TIME_MINUTES} -printf "%T@ %p\n" | sort -n | cut -d' ' -f2-)
154
#We need to substract globals.sql
155
- number_of_files=${#all_files[@]}-1
+ number_of_files=$(( ${#all_files[@]} - 1 ))
156
keep_count=$(( number_of_files < MIN_SAVED_FILE ? ${#all_files[@]} : MIN_SAVED_FILE ))
157
max_deletable=$(( number_of_files - keep_count ))
158
deletable=()
0 commit comments