Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Feb 8, 2025
1 parent feaed56 commit 68cd71c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function fetch-wal-log(){

# check if the wal_log contains the restore_time logs. if ture, stop fetching
latest_commit_time=$(pg_waldump ${wal_destination_dir}/$wal_name --rmgr=Transaction 2>/dev/null |tail -n 1|awk -F ' COMMIT ' '{print $2}'|awk -F ';' '{print $1}')
if [[ -z latest_commit_time ]]; then
if [[ -z $latest_commit_time ]]; then
continue
fi
timestamp=`date -d "$latest_commit_time" +%s`
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-archive-delete.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
backup_base_path="$(dirname $DP_BACKUP_BASE_PATH)/wal-g"
export WALG_DATASAFED_CONFIG=""
export PATH="$PATH:$DP_DATASAFED_BIN_PATH"
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-archive.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
backup_base_path="$(dirname $DP_BACKUP_BASE_PATH)/wal-g/wal_005"
export WALG_DATASAFED_CONFIG=""
export PATH="$PATH:$DP_DATASAFED_BIN_PATH"
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-backup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
backup_base_path="$(dirname $DP_BACKUP_BASE_PATH)/wal-g"
export WALG_DATASAFED_CONFIG=""
export PATH="$PATH:$DP_DATASAFED_BIN_PATH"
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
set -e

if [[ ! -f /etc/datasafed/datasafed.conf ]]; then
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-delete.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
export WALG_DATASAFED_CONFIG=""
export PATH="$PATH:$DP_DATASAFED_BIN_PATH"
export DATASAFED_BACKEND_BASE_PATH="$DP_BACKUP_BASE_PATH"
Expand Down
1 change: 1 addition & 0 deletions addons/postgresql/dataprotection/wal-g-restore.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
set -e
export WALG_DATASAFED_CONFIG=""
export WALG_COMPRESSION_METHOD=zstd
Expand Down

0 comments on commit 68cd71c

Please sign in to comment.