source: networking/netprogs/rsync.xml@ 81076bb6

10.0 10.1 11.0 8.4 9.0 9.1 qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 81076bb6 was 81076bb6, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tags for networking and postscript.
Archive two unused files.

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

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