source: networking/netprogs/rsync.xml@ c5d6597

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since c5d6597 was ed345e7, checked in by Douglas R. Reno <renodr@…>, 9 months ago

Tags

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