File: parallel-rsync.1

package info (click to toggle)
pssh 2.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 536 kB
  • sloc: python: 1,545; makefile: 15
file content (301 lines) | stat: -rw-r--r-- 6,042 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
.\" Man page for parallel-rsync.  See "man 7 man" and "man man-pages" for formatting info.
.TH parallel-rsync 1 "January 24, 2012"

.SH NAME
parallel-rsync \(em parallel file sync program


.SH SYNOPSIS
.B parallel-rsync
.RB [ \-vAraz ]
.RB [ \-h
.IR hosts_file ]
.RB [ \-H
.RI [ user @] host [: port ]]
.RB [ \-l
.IR user ]
.RB [ \-p
.IR par ]
.RB [ \-o
.IR outdir ]
.RB [ \-e
.IR errdir ]
.RB [ \-t
.IR timeout ]
.RB [ \-O
.IR options ]
.RB [ \-x
.IR args ]
.RB [ \-X
.IR arg ]
.RB [ \-S
.IR args ]
.I local ...
.I remote


.SH DESCRIPTION
.PP
.B parallel-rsync
is a program for copying files in parallel to a number of hosts using the
popular
.B rsync
program.  It provides features such as passing a password to ssh,
saving output to files, and timing out.


.SH OPTIONS

.TP
.BI \-h " host_file"
.PD 0
.TP
.BI \-\-hosts " host_file"
Read hosts from the given
.IR host_file .
Lines in the host file are of the form
.RI [ user @] host [: port ]
and can include blank lines and comments (lines beginning with "#").
If multiple host files are given (the
.B \-h
option is used more than once), then parallel-rsync behaves as though these files
were concatenated together.
If a host is specified multiple times, then parallel-rsync will connect the
given number of times.

.TP
.B \-H
.RI [ user @] host [: port ]
.PD 0
.TP
.B \-\-host
.RI [ user @] host [: port ]
.PD 0
.TP
.B \-H
.RI \(dq[ user @] host [: port ]
[
.RI [ user @] host [: port
] ... ]\(dq
.PD 0
.TP
.B \-\-host
.RI \(dq[ user @] host [: port ]
[
.RI [ user @] host [: port
] ... ]\(dq
.PD 0
.IP
Add the given host strings to the list of hosts.  This option may be given
multiple times, and may be used in conjunction with the
.B \-h
option.

.TP
.BI \-l " user"
.PD 0
.TP
.BI \-\-user " user"
Use the given username as the default for any host entries that don't
specifically specify a user.

.TP
.BI \-p " parallelism"
.PD 0
.TP
.BI \-\-par " parallelism"
Use the given number as the maximum number of concurrent connections.

.TP
.BI \-t " timeout"
.PD 0
.TP
.BI \-\-timeout " timeout"
Make connections time out after the given number of seconds.  With a value
of 0, parallel-rsync will not timeout any connections.

.TP
.BI \-o " outdir"
.PD 0
.TP
.BI \-\-outdir " outdir"
Save standard output to files in the given directory.  Filenames are of the
form
.RI [ user @] host [: port ][. num ]
where the user and port are only included for hosts that explicitly
specify them.  The number is a counter that is incremented each time for hosts
that are specified more than once.

.TP
.BI \-e " errdir"
.PD 0
.TP
.BI \-\-errdir " errdir"
Save standard error to files in the given directory.  Filenames are of the
same form as with the
.B \-o
option.

.TP
.BI \-x " args"
.PD 0
.TP
.BI \-\-extra-args " args"
Passes extra rsync command-line arguments (see the
.BR rsync (1)
man page for more information about rsync arguments).
This option may be specified multiple times.
The arguments are processed to split on whitespace, protect text within
quotes, and escape with backslashes.
To pass arguments without such processing, use the
.B \-X
option instead.

.TP
.BI \-X " arg"
.PD 0
.TP
.BI \-\-extra-arg " arg"
Passes a single rsync command-line argument (see the
.BR rsync (1)
man page for more information about rsync arguments).  Unlike the
.B \-x
option, no processing is performed on the argument, including word splitting.
To pass multiple command-line arguments, use the option once for each
argument.

.TP
.BI \-O " options"
.PD 0
.TP
.BI \-\-options " options"
SSH options in the format used in the SSH configuration file (see the
.BR ssh_config (5)
man page for more information).  This option may be specified multiple
times.

.TP
.B \-A
.PD 0
.TP
.B \-\-askpass
Prompt for a password and pass it to ssh.  The password may be used for
either to unlock a key or for password authentication.
The password is transferred in a fairly secure manner (e.g., it will not show
up in argument lists).  However, be aware that a root user on your system
could potentially intercept the password.

.TP
.B \-v
.PD 0
.TP
.B \-\-verbose
Include error messages from rsync with the
.B \-i
and
.B \-e
options.

.TP
.B \-r
.PD 0
.TP
.B \-\-recursive
Recursively copy directories.

.TP
.B \-a
.PD 0
.TP
.B \-\-archive
Use rsync archive mode (rsync's \-a option).

.TP
.B \-z
.PD 0
.TP
.B \-\-compress
Use rsync compression.

.TP
.BI \-S " args"
.PD 0
.TP
.BI \-\-ssh-args " args"
Passes extra SSH command-line arguments (see the
.BR ssh (1)
man page for more information about SSH arguments).
The given value is appended to the ssh command (rsync's \-e option) without
any processing.


.\" .SH EXAMPLES

.\" .PP
.\" Connect to host1 and host2, and print "hello, world" from each:
.\" .RS
.\" parallel-ssh -i -H "host1 host2" echo "hello, world"
.\" .RE


.SH TIPS

.\" .PP
.\" If you have a set of hosts that you connect to frequently with specific
.\" options, it may be helpful to create an alias such as:
.\" .RS
.\" alias parallel-ssh_servers="parallel-ssh -h /path/to/server_list.txt -l root -A"
.\" .RE

.PP
The ssh_config file can include an arbitrary number of Host sections.  Each
host entry specifies ssh options which apply only to the given host.  Host
definitions can even behave like aliases if the HostName option is included.
This ssh feature, in combination with parallel-ssh host files, provides a tremendous
amount of flexibility.


.SH EXIT STATUS

.PP
The exit status codes from parallel-rsync are as follows:

.TP
.B 0
Success

.TP
.B 1
Miscellaneous error

.TP
.B 2
Syntax or usage error

.TP
.B 3
At least one process was killed by a signal or timed out.

.TP
.B 4
All processes completed, but at least one rsync process reported an error
(exit status other than 0).


.SH AUTHORS
.PP
Written by
Brent N. Chun <bnc@theether.org> and
Andrew McNabb <amcnabb@mcnabbs.org>.

https://github.com/lilydjwg/parallel-ssh


.SH SEE ALSO
.BR rsync (1),
.BR ssh (1),
.BR ssh_config(5),
.BR parallel-ssh (1),
.BR parallel-rsync (1),
.BR parallel-slurp (1),
.BR parallel-nuke (1),