summaryrefslogtreecommitdiff
path: root/vendor/rsync_command/README.md
blob: 5e44845b17d6fa51434034fe0fb9e10fae216982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
RsyncCommand
==================================

The gem rsync_command provides a library wrapper around the rsync command line program, with additional support for parallel execution of rsync and configuration of OpenSSH options in the format understood by Capistrano (and Net::SSH).

Installation
------------------------------------

    gem install rsync_command

Usage
------------------------------------

    rsync   = RsyncCommand.new(:ssh => {:auth_methods => 'publickey'}, :flags => '-a')
    servers = ['red', 'green', 'blue']

    rsync.asynchronously(servers) do |sync, server|
      sync.user = 'root'
      sync.host = server
      sync.source = '/from'
      sync.dest = '/to'
      sync.exec
    end

    if rsync.failed?
      puts rsync.failures.join
    end