from fabric.contrib.project import rsync_project

def _deploy_ec2(loc):
    rsync_project(local_dir=loc, remote_dir='/var/www', exclude='.git')
How do I copy a directory to a remote machine using Fabric?