Skip to content

Commit

Permalink
Fix regex in wale_restore script (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcapet authored Jul 1, 2024
1 parent 5f69a19 commit 3853e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres-appliance/scripts/wale_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ATTEMPT=0
server_version="-1"
while true; do
[[ -z $wal_segment_backup_start ]] && wal_segment_backup_start=$($WAL_E backup-list 2> /dev/null \
| sed '0,/^(backup_\)?name\s*\(last_\)\?modified\s*/d' | sort -bk2 | tail -n1 | awk '{print $3;}' | sed 's/_.*$//')
| sed '0,/^\(backup_\)\?name\s*\(last_\)\?modified\s*/d' | sort -bk2 | tail -n1 | awk '{print $3;}' | sed 's/_.*$//')

[[ -n "$CONNSTR" && $server_version == "-1" ]] && server_version=$(psql -d "$CONNSTR" -tAc 'show server_version_num' 2> /dev/null || echo "-1")

Expand Down

0 comments on commit 3853e2b

Please sign in to comment.