source: networking/netprogs/rsync.xml@ 4825f68

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 4825f68 was 14891a90, checked in by Xi Ruoyao <xry111@…>, 12 months ago

treewide: More "User Notes" clean up

Remove links to pages w/o real contents.

  • Property mode set to 100644
File size: 10.4 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
[9c87711]34 &lfs113_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
190 <command>rsync</command> as a server. See the rsyncd.conf(5)
191 man-page for additional options (i.e., user authentication).
192 </para>
[5ab6e72]193
194<screen role="root"><userinput>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"
195<literal># This is a basic rsync configuration file
[0931098]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
[5ab6e72]208</literal>
209EOF</userinput></screen>
[0931098]210
[b51fe6e]211 <para>
212 You can find additional configuration information and general
213 documentation about <command>rsync</command> at
[f0f68c1]214 <ulink url="https://rsync.samba.org/documentation.html"/>.
[b51fe6e]215 </para>
[bccbdaea]216
[5ab6e72]217 </sect3>
[0931098]218
[fdf798a6]219 <sect3 id="rsync-init">
[7b478500]220 <title><phrase revision="sysv">Boot Script</phrase>
221 <phrase revision="systemd">Systemd Unit</phrase></title>
[0931098]222
[b51fe6e]223 <para>
[f0f68c1]224 Note that you only need to start the
[b51fe6e]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>
[0931098]241
[5ab6e72]242<screen role="root"><userinput>make install-rsyncd</userinput></screen>
[0931098]243
[7b478500]244 <note revision="systemd">
[b51fe6e]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
[8558044]253 using <application>{,x}inetd</application> on a SysVinit based
[b51fe6e]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>
[7b478500]263
[a42c273]264<screen role="nodump"><userinput>systemctl stop rsyncd &amp;&amp;
[7b478500]265systemctl disable rsyncd &amp;&amp;
266systemctl enable rsyncd.socket &amp;&amp;
267systemctl start rsyncd.socket</userinput></screen>
268
[b51fe6e]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>
[7b478500]273 </note>
274
[5ab6e72]275 </sect3>
[0931098]276
[5ab6e72]277 </sect2>
[0931098]278
[5ab6e72]279 <sect2 role="content">
280 <title>Contents</title>
[0931098]281
[5ab6e72]282 <segmentedlist>
283 <segtitle>Installed Program</segtitle>
284 <segtitle>Installed Libraries</segtitle>
285 <segtitle>Installed Directories</segtitle>
[0931098]286
[5ab6e72]287 <seglistitem>
[f0f68c1]288 <seg>rsync and rsync-ssl</seg>
[5ab6e72]289 <seg>None</seg>
[fdf798a6]290 <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
[5ab6e72]291 </seglistitem>
292 </segmentedlist>
[0931098]293
[5ab6e72]294 <variablelist>
295 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
296 <?dbfo list-presentation="list"?>
297 <?dbhtml list-presentation="table"?>
[0931098]298
[5ab6e72]299 <varlistentry id="rsync-prog">
300 <term><command>rsync</command></term>
301 <listitem>
[b51fe6e]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
[4c24eb0a]308 files are present at one end of the link beforehand
[b51fe6e]309 </para>
[5ab6e72]310 <indexterm zone="rsync rsync-prog">
311 <primary sortas="b-rsync">rsync</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
[0931098]315
[f0f68c1]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
[4c24eb0a]321 has SSL support built in
[f0f68c1]322 </para>
323 <indexterm zone="rsync rsync-ssl">
324 <primary sortas="b-rsync-ssl">rsync-ssl</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
[5ab6e72]329 </variablelist>
[46cef72]330
[5ab6e72]331 </sect2>
[46cef72]332
[5ab6e72]333</sect1>
Note: See TracBrowser for help on using the repository browser.