Try again, to move postgres dump file to /tmp before restoring
so the postgres can cd to current workdir without error..fingers crossed this doesn't break anything else again
This commit is contained in:
parent
bedca74ca1
commit
8e9a685006
|
@ -259,7 +259,12 @@ def clone_db(c, name, owner, download, user='rattail', force=False, workdir=None
|
||||||
os.chdir(curdir)
|
os.chdir(curdir)
|
||||||
|
|
||||||
# restore database on target server
|
# restore database on target server
|
||||||
restore_db(c, name, '{}.sql.gz'.format(name))
|
# TODO: first tried c.sudo('mv ...') but that did not work for the "typical"
|
||||||
|
# scenario of connecting as rattail@server to obtain db dump, since the dump
|
||||||
|
# cmd is normally carved out via sudoers config, but 'sudo mv ..' is not
|
||||||
|
filename = f'{name}.sql.gz'
|
||||||
|
c.run(f'mv {filename} /tmp/')
|
||||||
|
restore_db(c, name, f'/tmp/{filename}')
|
||||||
|
|
||||||
|
|
||||||
def restore_db(c, name, path):
|
def restore_db(c, name, path):
|
||||||
|
|
Loading…
Reference in a new issue