source: networking/netprogs/rsync.xml@ f0f68c1

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since f0f68c1 was f0f68c1, checked in by Douglas R. Reno <renodr@…>, 16 months ago

Update to rsync-3.2.0

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23302 af4574ff-66df-0310-9fd7-8a98e5e911e0

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