Devops question from a web developer alert :) I want to copy all locally modified files over to a remote server. Now I know I can use rsync, something like:

rsync -cavzu / me@remote.server:/file/path/

But I wondered whether there is a convenient wrapper around rsync these days? Ideally it would be nice to have the following features:

  • configure files that I never want to copy across (e.g. localsettings.py for Django projects)
  • store the remote filepath so I don't have to specify it each time
  • store different options for deploying to dev or production servers, specifying which with a single flag

Again, I guess I could do all this by writing my own shell scripts around rsync, but I would just like to know if there is an easier utility for doing the above these days.

closed as off topic by Sven, Jenny D, Khaled, Ward, mdpc Mar 27 '13 at 16:15

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Is this for pushing stuff from development to production? – Jake Stubbs Mar 27 '13 at 10:09
  • @JakeStubbs yes it is (or rather from a developer machine to a development or production server on a remote machine) – flossfan Mar 27 '13 at 10:13

If you would use Ruby on Rails, Capistrano is what you are looking for. I think there's something similar for Python/Django (UPDATE: It's called Fabric). Other languages and frameworks should have similar tools.

Capistrano doesn't use rsync, but runs a checkout from your Git (or other VCS) server. You can easily define your own deployment tasks and setup different environments.


Have you considered using SVN or Git?

They can both be used to 'push' (or commit) code from development to production but have the added benefits of version control and you can use hooks to execute custom scripts after certain events.

Git tends to be more popular and has better documentation. It can be awkward to adjust your workflow to use them but it's definitely worth it. If you don't want to have to manage your own Git / SVN server, there's plenty of services that offer it. Two that I've used personally are:

Not the answer you're looking for? Browse other questions tagged or ask your own question.