Fixed broken db restore
This commit is contained in:
parent
02140f07db
commit
530daa9eaf
6
bare.sh
6
bare.sh
|
@ -1101,9 +1101,11 @@ for f in $REPO_LIST; do
|
|||
RESTOREDIR="$RESTOREDIRBASE/$f/"
|
||||
snaps=$(${RESTIC} snapshots $AUTHOPTS $CONNECTIONSOPTS 2>&1 | grep -v ID | awk '(NF >= 4) { print }')
|
||||
if checktag "$f" postgres; then
|
||||
snaps=$(echo "$snaps" | grep -v postgres)
|
||||
snaps=$(echo "$snaps" | grep -w postgres)
|
||||
elif checktag "$f" mysql; then
|
||||
snaps=$(echo "$snaps" | grep -v mysql)
|
||||
snaps=$(echo "$snaps" | grep -w mysql)
|
||||
else
|
||||
snaps=$(echo "$snaps" | egrep -vw "postgres|mysql")
|
||||
fi
|
||||
snapids=$(echo "$snaps" | awk '{ print $1 }')
|
||||
defsid=$(echo "$snapids" | tail -1)
|
||||
|
|
Loading…
Reference in New Issue