Skip to content

Instantly share code, notes, and snippets.



Created Oct 17, 2009
What would you like to do?
Python: Fabric 0.9/1.x - Synchronize files with rsync
# -*- coding: utf-8 -*-
# Fabric 0.9/1.x – Synchronize files in a project folder with webserver
from fabric.api import env
from fabric.contrib.project import rsync_project
env.hosts = ['']
env.path = '/home/user/project/'
def sync():
Synchronize project with webserver
rsync_project(env.path, delete=True, exclude=['*.pyc','*.py','.DS_Store'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment