projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
423d406
)
Made DB reloading more robust against binary dumps
author
Roland Mas
<lolando@debian.org>
Thu, 19 Jul 2012 10:03:15 +0000
(10:03 +0000)
committer
Roland Mas
<lolando@debian.org>
Thu, 19 Jul 2012 10:03:15 +0000
(10:03 +0000)
tests/func/db_reload.sh
patch
|
blob
|
history
diff --git
a/tests/func/db_reload.sh
b/tests/func/db_reload.sh
index 5dd60d56b5bce1d8d696eae587b2b6153013ff47..3dc11e866d85d3d022f9b133a41706ed32ed2c53 100755
(executable)
--- a/
tests/func/db_reload.sh
+++ b/
tests/func/db_reload.sh
@@
-83,8
+83,8
@@
su - postgres -c "dropdb -e $database"
if [ -f /root/dump ]
then
if [ -f /root/dump ]
then
- echo "Restore database from dump file: p
sql -f- < /root/dump
"
-
su - postgres -c "psql -f-" < /root/dump
> /var/log/pg_restore.log 2>/var/log/pg_restore.err
+ echo "Restore database from dump file: p
g_restore -C /root/dump | psql -f- <
"
+
pg_restore -C /root/dump | su - postgres -c "psql -f-"
> /var/log/pg_restore.log 2>/var/log/pg_restore.err
else
# TODO: reinit the db from scratch and create the dump
echo "Couldn't restore the database: No /root/dump found"
else
# TODO: reinit the db from scratch and create the dump
echo "Couldn't restore the database: No /root/dump found"