1. Mikhail Korobov
  2. django-fab-deploy

Commits

Mikhail Korobov  committed d7589de

Saner defaults for mysqldump command

  • Participants
  • Parent commits 7e1c6db
  • Branches default

Comments (0)

Files changed (1)

File fab_deploy/commands.py

View file
  • Ignore whitespace
         touch()
 
 @inside_project
-def mysqldump(dir='hosting/backups'):
+def mysqldump(dir=None):
+    if dir is None:
+        dir = env.conf['ENV_DIR'] + '/var/backups'
+        run('mkdir -p ' + dir)
     now = datetime.now().strftime("%Y.%m.%d-%H.%M")
     db = env.conf['DB_NAME']
     password = env.conf['DB_PASSWORD']