Skip to content

Commit 39a6c8f

Browse files
authored
fix: wrong regex for wal retention (zalando#1026)
1 parent 937815a commit 39a6c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgres-appliance/scripts/postgres_backup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ while read -r name last_modified rest; do
5555
# count how many backups will remain after we remove everything up to certain date
5656
((LEFT=LEFT+1))
5757
fi
58-
done < <($WAL_E backup-list 2> /dev/null | sed '0,/^name\s*\(last_\)\?modified\s*/d')
58+
done < <($WAL_E backup-list 2> /dev/null | sed '0,/^\(backup_\)\?name\s*\(last_\)\?modified\s*/d')
5959

6060
# we want keep at least N backups even if the number of days exceeded
6161
if [ -n "$BEFORE" ] && [ $LEFT -ge $DAYS_TO_RETAIN ]; then

0 commit comments

Comments
 (0)