Skip to content
Snippets Groups Projects
Commit 97626a6c authored by Janos Bekesi's avatar Janos Bekesi :moyai:
Browse files

fabfile something

parent 15b0e667
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
# #
# First, we use this with virdam and the assets from our test runs # First, we use this with virdam and the assets from our test runs
# #
# _#fi75D$iL[V
#
# https://194046310792.signin.aws.amazon.com/console
#
from __future__ import absolute_import, print_function from __future__ import absolute_import, print_function
import datetime import datetime
import os import os
...@@ -17,7 +21,7 @@ logging.basicConfig(filename="fabfile.log", ...@@ -17,7 +21,7 @@ logging.basicConfig(filename="fabfile.log",
level=logging.INFO, level=logging.INFO,
format='%(levelname)s [%(asctime)s]: %(message)s', format='%(levelname)s [%(asctime)s]: %(message)s',
datefmt='%Y-%m-%d %H:%M') datefmt='%Y-%m-%d %H:%M')
env.hosts = ['root@virdam', "jb@rex001.phaidra.org"] env.hosts = ['root@virdam.univie.ac.at', "jb@rex001.phaidra.org"]
WORKDIR = { WORKDIR = {
'virdam': '/root/work/go/src/ghe.phaidra.org/bekesij9/explore', 'virdam': '/root/work/go/src/ghe.phaidra.org/bekesij9/explore',
...@@ -60,6 +64,7 @@ def get_remote_db(working="stored_hashes.{}.sqlite3"): ...@@ -60,6 +64,7 @@ def get_remote_db(working="stored_hashes.{}.sqlite3"):
working = working.format(_cur_host()) working = working.format(_cur_host())
gzipped = "{}.{}.down.gz".format(working, NOW_FMT) gzipped = "{}.{}.down.gz".format(working, NOW_FMT)
localdir = os.path.join(LOCAL, 'db') localdir = os.path.join(LOCAL, 'db')
print(env.hosts, _cur_host(), WORKDIR[_cur_host()], env.host)
with cd(WORKDIR[_cur_host()] + '/db'): with cd(WORKDIR[_cur_host()] + '/db'):
run('gzip -N -k -S .{}.down.gz {}'.format(NOW_FMT, working)) run('gzip -N -k -S .{}.down.gz {}'.format(NOW_FMT, working))
get(gzipped, localdir) get(gzipped, localdir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment