-1

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.

flossfan
  • 101
  • 2

2 Answers2

2

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.

claasz
  • 510
  • 3
  • 11
0

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:

Jake Stubbs
  • 176
  • 3