From 440130439e102f35e95fef87756238ea6df183e2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 16 Aug 2018 11:52:10 -0500 Subject: [PATCH] Echo error output to stderr when restoring postgres db apparently one can run out of disk space and never know it, with default output --- rattail_fabric/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rattail_fabric/postgresql.py b/rattail_fabric/postgresql.py index 2fee05f..0794f27 100644 --- a/rattail_fabric/postgresql.py +++ b/rattail_fabric/postgresql.py @@ -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))