From bb3083b9d5035f2f6c5f49a95763bfabd8041918 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 27 Dec 2021 11:47:36 +0100 Subject: [PATCH] Add download db from prod task --- tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks.py b/tasks.py index a82c890..509e142 100644 --- a/tasks.py +++ b/tasks.py @@ -37,3 +37,13 @@ def publish(ctx): @task def deploy(ctx): ctx.run("ssh ubuntu /home/gaugendre/blog/update", pty=True, echo=True) + + +@task +def download_db(ctx): + with ctx.cd(BASE_DIR): + ctx.run( + "scp ubuntu:/home/gaugendre/blog/db/db.sqlite3 ./db/db.sqlite3", + echo=True, + pty=True, + )