source: networking/netprogs/rsync.xml

trunk
Last change on this file was 19a12c69, checked in by Tim Tassonis <stuff@…>, 2 weeks ago

Update to rsync-3.3.0.

  • Property mode set to 100644
File size: 10.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY rsync-download-http "https://www.samba.org/ftp/rsync/src/rsync-&rsync-version;.tar.gz">
8 <!ENTITY rsync-download-ftp " ">
9 <!ENTITY rsync-md5sum "f5c17f9c9164ef9e60d9d8c96b23da06">
10 <!ENTITY rsync-size "1.2 MB">
11 <!ENTITY rsync-buildsize "9.2 MB (with tests; add 24 MB for HTML API documentation)">
12 <!ENTITY rsync-time "0.7 SBU (with tests)">
13]>
14
15<sect1 id="rsync" xreflabel="rsync-&rsync-version;">
16 <?dbhtml filename="rsync.html"?>
17
18
19 <title>rsync-&rsync-version;</title>
20
21 <indexterm zone="rsync">
22 <primary sortas="a-rsync">rsync</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to rsync</title>
27
28 <para>
29 The <application>rsync</application> package contains the
30 <command>rsync</command> utility. This is useful for synchronizing large
31 file archives over a network.
32 </para>
33
34 &lfs121_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&rsync-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&rsync-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &rsync-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &rsync-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &rsync-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &rsync-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">rsync Dependencies</bridgehead>
71
72 <!-- This now uses LZ4, OpenSSL, and zstd from LFS. -->
73 <bridgehead renderas="sect4">Recommended</bridgehead>
74 <para role="recommended">
75 <xref linkend="popt"/>
76 </para>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="doxygen"/> and
81 <ulink url="https://cyan4973.github.io/xxHash/">xxhash</ulink>
82 </para>
83
84 </sect2>
85
86 <sect2 role="installation">
87 <title>Installation of rsync</title>
88
89 <para>
90 For security reasons, running the <application>rsync</application>
91 server as an unprivileged user and group is encouraged. If you intend to
92 run <command>rsync</command> as a daemon, create the
93 <systemitem class="username">rsyncd</systemitem> user and group
94 with the following commands issued by the
95 <systemitem class="username">root</systemitem> user:
96 </para>
97
98<screen role="root"><userinput>groupadd -g 48 rsyncd &amp;&amp;
99useradd -c "rsyncd Daemon" -m -d /home/rsync -g rsyncd \
100 -s /bin/false -u 48 rsyncd</userinput></screen>
101
102 <para>
103 Install <application>rsync</application> by running the following
104 commands:
105 </para>
106
107<screen><userinput>./configure --prefix=/usr \
108 --disable-xxhash \
109 --without-included-zlib &amp;&amp;
110make</userinput></screen>
111
112 <para>
113 If you have <xref linkend="doxygen"/> installed and wish to
114 build HTML API documentation, issue:
115 </para>
116
117<screen remap="doc"><userinput>doxygen</userinput></screen>
118
119 <para>
120 To test the results, issue: <command>make check</command>.
121 </para>
122
123 <para>
124 Now, as the <systemitem class="username">root</systemitem> user:
125 </para>
126
127<screen role='root'><userinput>make install</userinput></screen>
128
129 <para>
130 If you built the documentation, install it using the following
131 commands as the <systemitem class="username">root</systemitem> user:
132 </para>
133
134<screen role='root'
135 remap="doc"><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version;/api &amp;&amp;
136install -v -m644 dox/html/* /usr/share/doc/rsync-&rsync-version;/api</userinput></screen>
137
138 </sect2>
139
140 <sect2 role="commands">
141 <title>Command Explanations</title>
142
143 <para>
144 <parameter>--disable-xxhash</parameter>: This switch disables advanced
145 xxhash checksum support. Remove this switch if you have installed
146 <ulink url="https://cyan4973.github.io/xxHash/">xxhash</ulink>.
147 </para>
148
149 <para>
150 <parameter>--without-included-zlib</parameter>: This switch enables
151 compilation with the system-installed zlib library.
152 </para>
153
154 </sect2>
155
156 <sect2 role="configuration">
157 <title>Configuring rsync</title>
158
159 <sect3 id="rsync-config">
160 <title>Config Files</title>
161
162 <para>
163 <filename>/etc/rsyncd.conf</filename>
164 </para>
165
166 <indexterm zone="rsync rsync-config">
167 <primary sortas="e-etc-rsyncd.conf">/etc/rsyncd.conf</primary>
168 </indexterm>
169
170 </sect3>
171
172 <sect3>
173 <title>Configuration Information</title>
174
175 <para>
176 For client access to remote files, you may need to install the
177 <xref linkend="openssh"/> package to connect to the remote server.
178 </para>
179
180 <para>
181 This is a simple download-only configuration to set up running
182 <command>rsync</command> as a server. See the <ulink role='man'
183 url='&man;rsyncd.conf.5'>rsyncd.conf(5)</ulink>
184 man-page for additional options (i.e., user authentication).
185 </para>
186
187<screen role="root"><userinput>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"
188<literal># This is a basic rsync configuration file
189# It exports a single module without user authentication.
190
191motd file = /home/rsync/welcome.msg
192use chroot = yes
193
194[localhost]
195 path = /home/rsync
196 comment = Default rsync module
197 read only = yes
198 list = yes
199 uid = rsyncd
200 gid = rsyncd
201</literal>
202EOF</userinput></screen>
203
204 <para>
205 You can find additional configuration information and general
206 documentation about <command>rsync</command> at
207 <ulink url="https://rsync.samba.org/documentation.html"/>.
208 </para>
209
210 </sect3>
211
212 <sect3 id="rsync-init">
213 <title><phrase revision="sysv">Boot Script</phrase>
214 <phrase revision="systemd">Systemd Unit</phrase></title>
215
216 <para>
217 Note that you only need to start the
218 <application>rsync</application> server if you want to provide an
219 <application>rsync</application> archive on your local machine.
220 You don't need this <phrase revision="sysv">script</phrase>
221 <phrase revision="systemd">unit</phrase> to run the
222 <application>rsync</application> client.
223 </para>
224
225 <para>
226 Install the
227 <phrase revision="sysv"><filename>/etc/rc.d/init.d/rsyncd</filename>
228 init script</phrase>
229 <phrase revision="systemd"><filename>rsyncd.service</filename>
230 unit</phrase> included in the
231 <xref linkend="bootscripts" revision="sysv"/>
232 <xref linkend="systemd-units" revision="systemd"/> package.
233 </para>
234
235<screen role="root"><userinput>make install-rsyncd</userinput></screen>
236
237 <note revision="systemd">
238 <para>
239 This package comes with two types of units: A service file and a
240 socket file. The service file will start rsync daemon once at boot
241 and it will keep running until the system shuts down. The socket file
242 will make systemd listen on rsync port (Default 873, needs to be
243 edited for anything else) and will start rsync daemon when something
244 tries to connect to that port and stop the daemon when the connection
245 is terminated. This is called socket activation and is analogous to
246 using <application>{,x}inetd</application> on a SysVinit based
247 system.
248 </para>
249
250 <para>
251 By default, the first method is used - rsync daemon is started
252 at boot and stopped at shutdown. If the socket method is desired, you
253 need to run as the
254 <systemitem class="username">root</systemitem> user:
255 </para>
256
257<screen role="nodump"><userinput>systemctl stop rsyncd &amp;&amp;
258systemctl disable rsyncd &amp;&amp;
259systemctl enable rsyncd.socket &amp;&amp;
260systemctl start rsyncd.socket</userinput></screen>
261
262 <para>
263 Note that socket method is only useful for remote backups. For
264 local backups you'll need the service method.
265 </para>
266 </note>
267
268 </sect3>
269
270 </sect2>
271
272 <sect2 role="content">
273 <title>Contents</title>
274
275 <segmentedlist>
276 <segtitle>Installed Program</segtitle>
277 <segtitle>Installed Libraries</segtitle>
278 <segtitle>Installed Directories</segtitle>
279
280 <seglistitem>
281 <seg>rsync and rsync-ssl</seg>
282 <seg>None</seg>
283 <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
284 </seglistitem>
285 </segmentedlist>
286
287 <variablelist>
288 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
289 <?dbfo list-presentation="list"?>
290 <?dbhtml list-presentation="table"?>
291
292 <varlistentry id="rsync-prog">
293 <term><command>rsync</command></term>
294 <listitem>
295 <para>
296 is a replacement for <command>rcp</command> (and
297 <command>scp</command>) that has many more features. It uses the
298 <quote>rsync algorithm</quote> which provides a very fast method of
299 syncing remote files. It does this by sending just the differences
300 in the files across the link, without requiring that both sets of
301 files are present at one end of the link beforehand
302 </para>
303 <indexterm zone="rsync rsync-prog">
304 <primary sortas="b-rsync">rsync</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="rsync-ssl">
310 <term><command>rsync-ssl</command></term>
311 <listitem>
312 <para>
313 is a helper script used when connecting to an rsync daemon that
314 has SSL support built in
315 </para>
316 <indexterm zone="rsync rsync-ssl">
317 <primary sortas="b-rsync-ssl">rsync-ssl</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 </variablelist>
323
324 </sect2>
325
326</sect1>
Note: See TracBrowser for help on using the repository browser.