source: networking/netprogs/rsync.xml

trunk
Last change on this file was 19a12c69, checked in by Tim Tassonis <stuff@…>, 2 weeks ago

Update to rsync-3.3.0.

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