source: networking/netprogs/rsync.xml@ 56fe3c1

12.1 ken/TL2024 lazarus rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 56fe3c1 was 23b54336, checked in by Xi Ruoyao <xry111@…>, 5 months ago

treewide: Convert more man page references to <ulink>s

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