zips dir into /backups, uploads to s3, deletes backups older than backup_aging_time.
    fab -f ./fabfile.py backup_dbs
    :param datadir:
    :param aws_access_key_id:
    :param aws_secret_access_key:
    :param bucket_name:
    :param zip_backups_dir:
    :param backup_aging_time:
    :param s3_folder:
    :param project:
    :return:

def backup(
        datadir,
        aws_access_key_id,
        aws_secret_access_key,
        bucket_name,
        zip_backups_dir, backup_aging_time, s3_folder, project):
    """
    zips dir into /backups, uploads to s3, deletes backups older than backup_aging_time.
    fab -f ./fabfile.py backup_dbs
    :param datadir:
    :param aws_access_key_id:
    :param aws_secret_access_key:
    :param bucket_name:
    :param zip_backups_dir:
    :param backup_aging_time:
    :param s3_folder:
    :param project:
    :return:
    """

    #  Connect to the bucket

    bucket = s3_bucket(aws_access_key_id, aws_secret_access_key, bucket_name)
    key = boto.s3.key.Key(bucket)

    bucketlist = bucket.list()

    pat = dir_zip_pat % project

    zip_file = '%s-%s.zip' % (dt.now().strftime(TIMESTAMP_FORMAT), project)
    print 'Zipping datadir %s to %s' % (zip_backups_dir, zip_file)
    zip_full_target = os.path.join(zip_backups_dir, zip_file)
    os.system('zip -r %s %s' % (zip_full_target, datadir))

    zip_local_full_target = zip_full_target
    # append '.zip'
    key.key = '%s/%s' % (s3_folder, zip_file)
    print 'STARTING upload of %s to %s: %s' % (zip_file, key.key, dt.now())
    try:
        key.set_contents_from_filename(zip_full_target)
        print 'Upload of %s FINISHED: %s' % (zip_local_full_target, dt.now())
    finally:
        delete_expired_backups_in_bucket(bucket, bucketlist, pat, backup_aging_time=backup_aging_time)
        delete_local_zip_backups(pat, zip_backups_dir, backup_aging_time)