Skip to content

Commit 11bc5c8

Browse files
committed
Fixed deleting old backups
1 parent 33f67e5 commit 11bc5c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mkdir -p "$backup_dir/$timestamp"
3434
# Function to cleanup old backups
3535
cleanup_old_backups() {
3636
local backup_dir="$1"
37-
local backups=($(ls -t "$backup_dir" | grep "^[0-9]*-[0-9]*$"))
37+
local backups=($(ls -r -t "$backup_dir" | grep "^[0-9]*-[0-9]*$"))
3838
local num_backups=${#backups[@]}
3939

4040
if [ $num_backups -gt $max_backups ]; then

0 commit comments

Comments
 (0)