From fc22ca305fb6730b34ad9d62a4e951293b33e30c Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Thu, 26 Apr 2012 22:49:43 -0400 Subject: [PATCH] Fucking fabric --- fabfile.py | 19 +++++++++++++++++++ requirements.txt | 1 + 2 files changed, 20 insertions(+) diff --git a/fabfile.py b/fabfile.py index 0b42d5a..fa733f8 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,5 +1,10 @@ from fabric.api import cd, local, env, run, sudo +from boto.s3.connection import S3Connection +from boto.s3.key import Key + +import datetime + env.hosts = ['nick@snipt.net:39039'] env.site_path = '/var/www/snipt' @@ -29,3 +34,17 @@ def re(): with cd(env.site_path): run('/var/www/snipt/gk') run('/var/www/snipt/gs') + +def db_backup(): + + filename = datetime.datetime.now().strftime('%m-%d-%y') + + print filename + + #run('pg_dump snipt > snipt.pgdump') + + #conn = S3Connection('AKIAJJRRQPTSPKB7GYOA', 'DIYz2g5vPjcWE4/YI7wEuUVAskwJxs2llFvGyI1a') + #snipt_bucket = conn.get_bucket('snipt') + + #k = Key(snipt_bucket) + #k.set_contents_from_filename('snipt.pgdump') diff --git a/requirements.txt b/requirements.txt index 2a5efa6..649d6cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ BeautifulSoup +boto biplist Django django-annoying