source: networking/netprogs/rsync.xml@ 3f2db3a6

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 3f2db3a6 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 19 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
RevLine 
[0931098]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[0931098]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[1c73261]7 <!ENTITY rsync-download-http "https://www.samba.org/ftp/rsync/src/rsync-&rsync-version;.tar.gz">
8 <!ENTITY rsync-download-ftp " ">
[8955f28]9 <!ENTITY rsync-md5sum "f216f350ef56b9ba61bc313cb6ec2ed6">
[c98a330]10 <!ENTITY rsync-size "1.1 MB">
[8a42ba9b]11 <!ENTITY rsync-buildsize "9.6 MB (with tests; add 24 MB for HTML API documentation)">
[f0f68c1]12 <!ENTITY rsync-time "0.7 SBU (with tests)">
[0931098]13]>
14
[46cef72]15<sect1 id="rsync" xreflabel="rsync-&rsync-version;">
[5ab6e72]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
[b51fe6e]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>
[5ab6e72]33
[dca2b43e]34 &lfs112_checked;
[20e6cade]35
[5ab6e72]36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
[b51fe6e]39 <para>
40 Download (HTTP): <ulink url="&rsync-download-http;"/>
41 </para>
[5ab6e72]42 </listitem>
43 <listitem>
[b51fe6e]44 <para>
45 Download (FTP): <ulink url="&rsync-download-ftp;"/>
46 </para>
[5ab6e72]47 </listitem>
48 <listitem>
[b51fe6e]49 <para>
50 Download MD5 sum: &rsync-md5sum;
51 </para>
[5ab6e72]52 </listitem>
53 <listitem>
[b51fe6e]54 <para>
55 Download size: &rsync-size;
56 </para>
[5ab6e72]57 </listitem>
58 <listitem>
[b51fe6e]59 <para>
60 Estimated disk space required: &rsync-buildsize;
61 </para>
[5ab6e72]62 </listitem>
63 <listitem>
[b51fe6e]64 <para>
65 Estimated build time: &rsync-time;
66 </para>
[5ab6e72]67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">rsync Dependencies</bridgehead>
71
[f0f68c1]72 <!-- This does now use OpenSSL and zstd from LFS. -->
[b802f15]73 <bridgehead renderas="sect4">Recommended</bridgehead>
74 <para role="recommended">
75 <xref linkend="popt"/>
76 </para>
77
[f0f68c1]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
[3cb0c57]85 <para condition="html" role="usernotes">User Notes:
86 <ulink url="&blfs-wiki;/rsync"/></para>
87
[5ab6e72]88 </sect2>
89
90 <sect2 role="installation">
91 <title>Installation of rsync</title>
92
[b51fe6e]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>
[5ab6e72]101
[fdf798a6]102<screen role="root"><userinput>groupadd -g 48 rsyncd &amp;&amp;
[0c8e745]103useradd -c "rsyncd Daemon" -m -d /home/rsync -g rsyncd \
[fdf798a6]104 -s /bin/false -u 48 rsyncd</userinput></screen>
[5ab6e72]105
[b51fe6e]106 <para>
107 Install <application>rsync</application> by running the following
108 commands:
109 </para>
[5ab6e72]110
[f0f68c1]111<screen><userinput>./configure --prefix=/usr \
112 --disable-lz4 \
113 --disable-xxhash \
114 --without-included-zlib &amp;&amp;
[fdf798a6]115make</userinput></screen>
116
[b51fe6e]117 <para>
118 If you have <xref linkend="doxygen"/> installed and wish to
119 build HTML API documentation, issue:
120 </para>
[a42c273]121
122<screen remap="doc"><userinput>doxygen</userinput></screen>
[9b7fb82]123
[b51fe6e]124 <para>
125 To test the results, issue: <command>make check</command>.
126 </para>
[fdf798a6]127
[b51fe6e]128 <para>
129 Now, as the <systemitem class="username">root</systemitem> user:
130 </para>
[fdf798a6]131
132<screen role='root'><userinput>make install</userinput></screen>
133
[b51fe6e]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>
[fdf798a6]138
[a42c273]139<screen role='root'
140 remap="doc"><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version;/api &amp;&amp;
[3534db5d]141install -v -m644 dox/html/* /usr/share/doc/rsync-&rsync-version;/api</userinput></screen>
[0931098]142
[5ab6e72]143 </sect2>
[0931098]144
[04e3c200]145 <sect2 role="commands">
146 <title>Command Explanations</title>
147
[f0f68c1]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
[04e3c200]160 <para>
161 <parameter>--without-included-zlib</parameter>: This switch enables
[f0f68c1]162 compilation with the system-installed zlib library.
[04e3c200]163 </para>
164
165 </sect2>
166
[5ab6e72]167 <sect2 role="configuration">
168 <title>Configuring rsync</title>
[0931098]169
[5ab6e72]170 <sect3 id="rsync-config">
171 <title>Config Files</title>
[0931098]172
[b51fe6e]173 <para>
174 <filename>/etc/rsyncd.conf</filename>
175 </para>
[0931098]176
[5ab6e72]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
[b51fe6e]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>
[fdf798a6]190
[b51fe6e]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>
[5ab6e72]196
197<screen role="root"><userinput>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"
198<literal># This is a basic rsync configuration file
[0931098]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
[5ab6e72]211</literal>
212EOF</userinput></screen>
[0931098]213
[b51fe6e]214 <para>
215 You can find additional configuration information and general
216 documentation about <command>rsync</command> at
[f0f68c1]217 <ulink url="https://rsync.samba.org/documentation.html"/>.
[b51fe6e]218 </para>
[bccbdaea]219
[5ab6e72]220 </sect3>
[0931098]221
[fdf798a6]222 <sect3 id="rsync-init">
[7b478500]223 <title><phrase revision="sysv">Boot Script</phrase>
224 <phrase revision="systemd">Systemd Unit</phrase></title>
[0931098]225
[b51fe6e]226 <para>
[f0f68c1]227 Note that you only need to start the
[b51fe6e]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>
[0931098]244
[5ab6e72]245<screen role="root"><userinput>make install-rsyncd</userinput></screen>
[0931098]246
[7b478500]247 <note revision="systemd">
[b51fe6e]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
[8558044]256 using <application>{,x}inetd</application> on a SysVinit based
[b51fe6e]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>
[7b478500]266
[a42c273]267<screen role="nodump"><userinput>systemctl stop rsyncd &amp;&amp;
[7b478500]268systemctl disable rsyncd &amp;&amp;
269systemctl enable rsyncd.socket &amp;&amp;
270systemctl start rsyncd.socket</userinput></screen>
271
[b51fe6e]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>
[7b478500]276 </note>
277
[5ab6e72]278 </sect3>
[0931098]279
[5ab6e72]280 </sect2>
[0931098]281
[5ab6e72]282 <sect2 role="content">
283 <title>Contents</title>
[0931098]284
[5ab6e72]285 <segmentedlist>
286 <segtitle>Installed Program</segtitle>
287 <segtitle>Installed Libraries</segtitle>
288 <segtitle>Installed Directories</segtitle>
[0931098]289
[5ab6e72]290 <seglistitem>
[f0f68c1]291 <seg>rsync and rsync-ssl</seg>
[5ab6e72]292 <seg>None</seg>
[fdf798a6]293 <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
[5ab6e72]294 </seglistitem>
295 </segmentedlist>
[0931098]296
[5ab6e72]297 <variablelist>
298 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
299 <?dbfo list-presentation="list"?>
300 <?dbhtml list-presentation="table"?>
[0931098]301
[5ab6e72]302 <varlistentry id="rsync-prog">
303 <term><command>rsync</command></term>
304 <listitem>
[b51fe6e]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
[4c24eb0a]311 files are present at one end of the link beforehand
[b51fe6e]312 </para>
[5ab6e72]313 <indexterm zone="rsync rsync-prog">
314 <primary sortas="b-rsync">rsync</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
[0931098]318
[f0f68c1]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
[4c24eb0a]324 has SSL support built in
[f0f68c1]325 </para>
326 <indexterm zone="rsync rsync-ssl">
327 <primary sortas="b-rsync-ssl">rsync-ssl</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
[5ab6e72]332 </variablelist>
[46cef72]333
[5ab6e72]334 </sect2>
[46cef72]335
[5ab6e72]336</sect1>
Note: See TracBrowser for help on using the repository browser.