Skip to content

Commit

Permalink
fix: restore from a backup of 0.5.0 in 0.6.0 (#4514)
Browse files Browse the repository at this point in the history
(cherry picked from commit a70baf6)
  • Loading branch information
wangyelei committed Jul 27, 2023
1 parent f64a946 commit abeb26d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions deploy/postgresql/templates/backuptool-pgbasebackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ spec:
set -e;
cd ${BACKUP_DIR};
mkdir -p ${DATA_DIR};
tar -xvf base.tar -C ${DATA_DIR}/;
tar -xvf pg_wal.tar -C ${DATA_DIR}/pg_wal/;
# compatible with gzip compression for version 0.5.0
if [ -f base.tar.gz ];then
tar -xvf base.tar.gz -C ${DATA_DIR}/;
else
tar -xvf base.tar -C ${DATA_DIR}/;
fi
if [ -f pg_wal.tar.gz ];then
tar -xvf pg_wal.tar.gz -C ${DATA_DIR}/pg_wal/;
else
tar -xvf pg_wal.tar -C ${DATA_DIR}/pg_wal/;
fi
echo "done!";
incrementalRestoreCommands: []
logical:
Expand Down

0 comments on commit abeb26d

Please sign in to comment.