source: networking/netprogs/rsync.xml@ a956d0b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 a956d0b was 8396e0c, checked in by Ken Moffat <ken@…>, 5 years ago

tags

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

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