source: networking/netprogs/rsync.xml@ b51fe6e

10.0 10.1 11.0 11.1 11.2 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b51fe6e was b51fe6e, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format netprogs

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22874 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.3 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 "1581a588fde9d89f6bc6201e8129afaf">
10 <!ENTITY rsync-size "884 KB">
11 <!ENTITY rsync-buildsize "11 MB (with tests - additional 45 MB for HTML API documentation)">
12 <!ENTITY rsync-time "0.5 SBU (with tests)">
13]>
14
15<sect1 id="rsync" xreflabel="rsync-&rsync-version;">
16 <?dbhtml filename="rsync.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>rsync-&rsync-version;</title>
24
25 <indexterm zone="rsync">
26 <primary sortas="a-rsync">rsync</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to rsync</title>
31
32 <para>
33 The <application>rsync</application> package contains the
34 <command>rsync</command> utility. This is useful for synchronizing large
35 file archives over a network.
36 </para>
37
38 &lfs91_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&rsync-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&rsync-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &rsync-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &rsync-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &rsync-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &rsync-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">rsync Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Recommended</bridgehead>
77 <para role="recommended">
78 <xref linkend="popt"/>
79 </para>
80
81 <para condition="html" role="usernotes">User Notes:
82 <ulink url="&blfs-wiki;/rsync"/></para>
83
84 </sect2>
85
86 <sect2 role="installation">
87 <title>Installation of rsync</title>
88
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>
97
98<screen role="root"><userinput>groupadd -g 48 rsyncd &amp;&amp;
99useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd \
100 -s /bin/false -u 48 rsyncd</userinput></screen>
101
102 <para>
103 Install <application>rsync</application> by running the following
104 commands:
105 </para>
106
107<screen><userinput>./configure --prefix=/usr --without-included-zlib &amp;&amp;
108make</userinput></screen>
109
110 <para>
111 If you have <xref linkend="doxygen"/> installed and wish to
112 build HTML API documentation, issue:
113 </para>
114
115<screen remap="doc"><userinput>doxygen</userinput></screen>
116
117 <para>
118 To test the results, issue: <command>make check</command>.
119 </para>
120
121 <para>
122 Now, as the <systemitem class="username">root</systemitem> user:
123 </para>
124
125<screen role='root'><userinput>make install</userinput></screen>
126
127 <para>
128 If you built the documentation, install it using the following
129 commands as the <systemitem class="username">root</systemitem> user:
130 </para>
131
132<screen role='root'
133 remap="doc"><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version;/api &amp;&amp;
134install -v -m644 dox/html/* /usr/share/doc/rsync-&rsync-version;/api</userinput></screen>
135
136 </sect2>
137
138 <sect2 role="commands">
139 <title>Command Explanations</title>
140
141 <para>
142 <parameter>--without-included-zlib</parameter>: This switch enables
143 compilation with system-installed zlib library.
144 </para>
145
146 </sect2>
147
148 <sect2 role="configuration">
149 <title>Configuring rsync</title>
150
151 <sect3 id="rsync-config">
152 <title>Config Files</title>
153
154 <para>
155 <filename>/etc/rsyncd.conf</filename>
156 </para>
157
158 <indexterm zone="rsync rsync-config">
159 <primary sortas="e-etc-rsyncd.conf">/etc/rsyncd.conf</primary>
160 </indexterm>
161
162 </sect3>
163
164 <sect3>
165 <title>Configuration Information</title>
166
167 <para>
168 For client access to remote files, you may need to install the
169 <xref linkend="openssh"/> package to connect to the remote server.
170 </para>
171
172 <para>
173 This is a simple download-only configuration to set up running
174 <command>rsync</command> as a server. See the rsyncd.conf(5)
175 man-page for additional options (i.e., user authentication).
176 </para>
177
178<screen role="root"><userinput>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"
179<literal># This is a basic rsync configuration file
180# It exports a single module without user authentication.
181
182motd file = /home/rsync/welcome.msg
183use chroot = yes
184
185[localhost]
186 path = /home/rsync
187 comment = Default rsync module
188 read only = yes
189 list = yes
190 uid = rsyncd
191 gid = rsyncd
192</literal>
193EOF</userinput></screen>
194
195 <para>
196 You can find additional configuration information and general
197 documentation about <command>rsync</command> at
198 <ulink url="http://rsync.samba.org/documentation.html"/>.
199 </para>
200
201 </sect3>
202
203 <sect3 id="rsync-init">
204 <title><phrase revision="sysv">Boot Script</phrase>
205 <phrase revision="systemd">Systemd Unit</phrase></title>
206
207 <para>
208 Note that you only want to start the
209 <application>rsync</application> server if you want to provide an
210 <application>rsync</application> archive on your local machine.
211 You don't need this <phrase revision="sysv">script</phrase>
212 <phrase revision="systemd">unit</phrase> to run the
213 <application>rsync</application> client.
214 </para>
215
216 <para>
217 Install the
218 <phrase revision="sysv"><filename>/etc/rc.d/init.d/rsyncd</filename>
219 init script</phrase>
220 <phrase revision="systemd"><filename>rsyncd.service</filename>
221 unit</phrase> included in the
222 <xref linkend="bootscripts" revision="sysv"/>
223 <xref linkend="systemd-units" revision="systemd"/> package.
224 </para>
225
226<screen role="root"><userinput>make install-rsyncd</userinput></screen>
227
228 <note revision="systemd">
229 <para>
230 This package comes with two types of units: A service file and a
231 socket file. The service file will start rsync daemon once at boot
232 and it will keep running until the system shuts down. The socket file
233 will make systemd listen on rsync port (Default 873, needs to be
234 edited for anything else) and will start rsync daemon when something
235 tries to connect to that port and stop the daemon when the connection
236 is terminated. This is called socket activation and is analogous to
237 using <application>{,x}inetd</application> on a SysVinit based
238 system.
239 </para>
240
241 <para>
242 By default, the first method is used - rsync daemon is started
243 at boot and stopped at shutdown. If the socket method is desired, you
244 need to run as the
245 <systemitem class="username">root</systemitem> user:
246 </para>
247
248<screen role="nodump"><userinput>systemctl stop rsyncd &amp;&amp;
249systemctl disable rsyncd &amp;&amp;
250systemctl enable rsyncd.socket &amp;&amp;
251systemctl start rsyncd.socket</userinput></screen>
252
253 <para>
254 Note that socket method is only useful for remote backups. For
255 local backups you'll need the service method.
256 </para>
257 </note>
258
259 </sect3>
260
261 </sect2>
262
263 <sect2 role="content">
264 <title>Contents</title>
265
266 <segmentedlist>
267 <segtitle>Installed Program</segtitle>
268 <segtitle>Installed Libraries</segtitle>
269 <segtitle>Installed Directories</segtitle>
270
271 <seglistitem>
272 <seg>rsync</seg>
273 <seg>None</seg>
274 <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
275 </seglistitem>
276 </segmentedlist>
277
278 <variablelist>
279 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
280 <?dbfo list-presentation="list"?>
281 <?dbhtml list-presentation="table"?>
282
283 <varlistentry id="rsync-prog">
284 <term><command>rsync</command></term>
285 <listitem>
286 <para>
287 is a replacement for <command>rcp</command> (and
288 <command>scp</command>) that has many more features. It uses the
289 <quote>rsync algorithm</quote> which provides a very fast method of
290 syncing remote files. It does this by sending just the differences
291 in the files across the link, without requiring that both sets of
292 files are present at one end of the link beforehand.
293 </para>
294 <indexterm zone="rsync rsync-prog">
295 <primary sortas="b-rsync">rsync</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 </variablelist>
301
302 </sect2>
303
304</sect1>
Note: See TracBrowser for help on using the repository browser.