[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 " ">
|
---|
[2b1b6abe] | 9 | <!ENTITY rsync-md5sum "0f758d7e000c0f7f7d3792610fad70cb">
|
---|
| 10 | <!ENTITY rsync-size "872 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)">
|
---|
[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 |
|
---|
[7ec42f5] | 36 | &lfs78_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 &&
|
---|
| 83 | useradd -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 &&
|
---|
[fdf798a6] | 90 | make</userinput></screen>
|
---|
| 91 |
|
---|
[9b7fb82] | 92 | <para>If you have <xref linkend="doxygen"/> installed and wish to
|
---|
[aca42dac] | 93 | build HTML API documentation, issue <command>doxygen</command>.</para>
|
---|
[9b7fb82] | 94 |
|
---|
[fdf798a6] | 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 |
|
---|
[9b7fb82] | 101 | <para>If you built the documentation, install it using the following
|
---|
[fdf798a6] | 102 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 103 |
|
---|
[9b7fb82] | 104 | <screen role='root'><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version;/api &&
|
---|
[3534db5d] | 105 | install -v -m644 dox/html/* /usr/share/doc/rsync-&rsync-version;/api</userinput></screen>
|
---|
[0931098] | 106 |
|
---|
[5ab6e72] | 107 | </sect2>
|
---|
[0931098] | 108 |
|
---|
[04e3c200] | 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 |
|
---|
[5ab6e72] | 119 | <sect2 role="configuration">
|
---|
| 120 | <title>Configuring rsync</title>
|
---|
[0931098] | 121 |
|
---|
[5ab6e72] | 122 | <sect3 id="rsync-config">
|
---|
| 123 | <title>Config Files</title>
|
---|
[0931098] | 124 |
|
---|
[5ab6e72] | 125 | <para><filename>/etc/rsyncd.conf</filename></para>
|
---|
[0931098] | 126 |
|
---|
[5ab6e72] | 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 |
|
---|
[bccbdaea] | 136 | <para>For client access to remote files, you may need to install the
|
---|
[fdf798a6] | 137 | <xref linkend="openssh"/> package to connect to the remote server.</para>
|
---|
| 138 |
|
---|
[bccbdaea] | 139 | <para>This is a simple download-only configuration to set up running
|
---|
[fdf798a6] | 140 | <command>rsync</command> as a server. See the rsyncd.conf(5)
|
---|
[5ab6e72] | 141 | man-page for additional options (i.e., user authentication).</para>
|
---|
| 142 |
|
---|
| 143 | <screen role="root"><userinput>cat > /etc/rsyncd.conf << "EOF"
|
---|
| 144 | <literal># This is a basic rsync configuration file
|
---|
[0931098] | 145 | # It exports a single module without user authentication.
|
---|
| 146 |
|
---|
| 147 | motd file = /home/rsync/welcome.msg
|
---|
| 148 | use 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
|
---|
[5ab6e72] | 157 | </literal>
|
---|
| 158 | EOF</userinput></screen>
|
---|
[0931098] | 159 |
|
---|
[fdf798a6] | 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>
|
---|
[bccbdaea] | 163 |
|
---|
[5ab6e72] | 164 | </sect3>
|
---|
[0931098] | 165 |
|
---|
[fdf798a6] | 166 | <sect3 id="rsync-init">
|
---|
[5ab6e72] | 167 | <title>Boot Script</title>
|
---|
[0931098] | 168 |
|
---|
[5ab6e72] | 169 | <para>Note that you only want to start the
|
---|
[fdf798a6] | 170 | <application>rsync</application> server if you want to provide an
|
---|
[5ab6e72] | 171 | <application>rsync</application> archive on your local machine.
|
---|
| 172 | You don't need this script to run the
|
---|
| 173 | <application>rsync</application> client.</para>
|
---|
[fce1d8e] | 174 |
|
---|
[5ab6e72] | 175 | <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
|
---|
| 176 | script included in the
|
---|
[5254d12] | 177 | <xref linkend="bootscripts"/> package.</para>
|
---|
[0931098] | 178 |
|
---|
[5ab6e72] | 179 | <screen role="root"><userinput>make install-rsyncd</userinput></screen>
|
---|
[0931098] | 180 |
|
---|
[5ab6e72] | 181 | </sect3>
|
---|
[0931098] | 182 |
|
---|
[5ab6e72] | 183 | </sect2>
|
---|
[0931098] | 184 |
|
---|
[5ab6e72] | 185 | <sect2 role="content">
|
---|
| 186 | <title>Contents</title>
|
---|
[0931098] | 187 |
|
---|
[5ab6e72] | 188 | <segmentedlist>
|
---|
| 189 | <segtitle>Installed Program</segtitle>
|
---|
| 190 | <segtitle>Installed Libraries</segtitle>
|
---|
| 191 | <segtitle>Installed Directories</segtitle>
|
---|
[0931098] | 192 |
|
---|
[5ab6e72] | 193 | <seglistitem>
|
---|
| 194 | <seg>rsync</seg>
|
---|
| 195 | <seg>None</seg>
|
---|
[fdf798a6] | 196 | <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
|
---|
[5ab6e72] | 197 | </seglistitem>
|
---|
| 198 | </segmentedlist>
|
---|
[0931098] | 199 |
|
---|
[5ab6e72] | 200 | <variablelist>
|
---|
| 201 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 202 | <?dbfo list-presentation="list"?>
|
---|
| 203 | <?dbhtml list-presentation="table"?>
|
---|
[0931098] | 204 |
|
---|
[5ab6e72] | 205 | <varlistentry id="rsync-prog">
|
---|
| 206 | <term><command>rsync</command></term>
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>is a replacement for <command>rcp</command> (and
|
---|
| 209 | <command>scp</command>) that has many more features. It uses the
|
---|
[fdf798a6] | 210 | <quote>rsync algorithm</quote> which provides a very fast method of
|
---|
| 211 | syncing remote files. It does this by sending just the differences
|
---|
| 212 | in the files across the link, without requiring that both sets of
|
---|
| 213 | files are present at one end of the link beforehand.</para>
|
---|
[5ab6e72] | 214 | <indexterm zone="rsync rsync-prog">
|
---|
| 215 | <primary sortas="b-rsync">rsync</primary>
|
---|
| 216 | </indexterm>
|
---|
| 217 | </listitem>
|
---|
| 218 | </varlistentry>
|
---|
[0931098] | 219 |
|
---|
[5ab6e72] | 220 | </variablelist>
|
---|
[46cef72] | 221 |
|
---|
[5ab6e72] | 222 | </sect2>
|
---|
[46cef72] | 223 |
|
---|
[5ab6e72] | 224 | </sect1>
|
---|