Echo error output to stderr when restoring postgres db

apparently one can run out of disk space and never know it, with default output
This commit is contained in:
Lance Edgar 2018-08-16 11:52:10 -05:00
parent 167140dce1
commit 440130439e

View file

@ -191,5 +191,5 @@ def clone_db(name, owner, download, user='rattail', force=False, workdir=None):
# restore database on target server
run('gunzip --force {}.sql.gz'.format(name))
sudo('sudo -u postgres psql --file={0}.sql {0}'.format(name), shell=False)
sudo('sudo -u postgres psql --echo-errors --file={0}.sql {0}'.format(name), shell=False)
run('rm {}.sql'.format(name))