parameters: ()
docstring: Dump entire database on server and backup to local.
docstring_summary: Dump entire database on server and backup to local.
docstring_tokens: Dump entire database on server and backup to local .
function: def backup():
      '''
      Dump entire database on server and backup to local.
      '''
      dt = _now()
      f = 'backup-awesome-%s.sql' % dt
      with cd('/tmp'):
          run('mysqldump --user=%s --password=%s --skip-opt --add-drop-table --default-character-set=utf8 --quick awesome > %s' % (db_user, db_password, f))
          run('tar -czvf %s.tar.gz %s' % (f, f))
          get('%s.tar.gz' % f, '%s/backup/' % _current_path())
          run('rm -f %s' % f)
          run('rm -f %s.tar.gz' % f)
function_tokens: def backup ( ) : dt = _now ( ) f = 'backup-awesome-%s.sql' % dt with cd ( '/tmp' ) : run ( 'mysqldump --user=%s --password=%s --skip-opt --add-drop-table --default-character-set=utf8 --quick awesome > %s' % ( db_user , db_password , f ) ) run ( 'tar -czvf %s.tar.gz %s' % ( f , f ) ) get ( '%s.tar.gz' % f , '%s/backup/' % _current_path ( ) ) run ( 'rm -f %s' % f ) run ( 'rm -f %s.tar.gz' % f )