source: networking/netprogs/rsync.xml@ 17aa21c

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 17aa21c was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

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