This commit is contained in:
bel
2021-09-14 06:29:17 -06:00
commit a71c585675
36 changed files with 700 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#! /bin/bash
until psql $DATABASE_URL < /dev/null; do
sleep 1
done
for f in /mnt/save/$(ls /mnt/save | sort -r); do
echo restore $f
psql $DATABASE_URL < $f &> /dev/null
ret=$?
echo restore result: $ret
# TODO server isn't started to assert db is OK
exit $ret
if [ $ret == 0 ]; then
if curl -sS -i localhost:80 | grep login; then
exit $ret
fi
fi
done