[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 |
|
---|
[9b7fb82] | 7 | <!ENTITY rsync-download-http "http://rsync.samba.org/ftp/rsync/rsync-&rsync-version;.tar.gz">
|
---|
| 8 | <!ENTITY rsync-download-ftp "ftp://ftp.samba.org/pub/rsync/rsync-&rsync-version;.tar.gz">
|
---|
| 9 | <!-- <!ENTITY rsync-download-http "http://rsync.samba.org/ftp/rsync/old-versions/rsync-&rsync-version;.tar.gz"> -->
|
---|
| 10 | <!-- <!ENTITY rsync-download-ftp "&gentoo-ftp-repo;/rsync-&rsync-version;.tar.gz"> -->
|
---|
| 11 | <!ENTITY rsync-md5sum "996d8d8831dbca17910094e56dcb5942">
|
---|
| 12 | <!ENTITY rsync-size "811 KB">
|
---|
| 13 | <!ENTITY rsync-buildsize "26 MB (includes installing all documentation)">
|
---|
[1e642794] | 14 | <!ENTITY rsync-time "0.2 SBU">
|
---|
[0931098] | 15 | ]>
|
---|
| 16 |
|
---|
[46cef72] | 17 | <sect1 id="rsync" xreflabel="rsync-&rsync-version;">
|
---|
[5ab6e72] | 18 | <?dbhtml filename="rsync.html"?>
|
---|
| 19 |
|
---|
| 20 | <sect1info>
|
---|
| 21 | <othername>$LastChangedBy$</othername>
|
---|
| 22 | <date>$Date$</date>
|
---|
| 23 | </sect1info>
|
---|
| 24 |
|
---|
| 25 | <title>rsync-&rsync-version;</title>
|
---|
| 26 |
|
---|
| 27 | <indexterm zone="rsync">
|
---|
| 28 | <primary sortas="a-rsync">rsync</primary>
|
---|
| 29 | </indexterm>
|
---|
| 30 |
|
---|
| 31 | <sect2 role="package">
|
---|
| 32 | <title>Introduction to rsync</title>
|
---|
| 33 |
|
---|
| 34 | <para>The <application>rsync</application> package contains the
|
---|
| 35 | <command>rsync</command> utility. This is useful for synchronizing large
|
---|
| 36 | file archives over a network.</para>
|
---|
| 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">Optional</bridgehead>
|
---|
[9b7fb82] | 63 | <para role="optional"><xref linkend="popt"/></para>
|
---|
[5ab6e72] | 64 |
|
---|
[3cb0c57] | 65 | <para condition="html" role="usernotes">User Notes:
|
---|
| 66 | <ulink url="&blfs-wiki;/rsync"/></para>
|
---|
| 67 |
|
---|
[5ab6e72] | 68 | </sect2>
|
---|
| 69 |
|
---|
| 70 | <sect2 role="installation">
|
---|
| 71 | <title>Installation of rsync</title>
|
---|
| 72 |
|
---|
| 73 | <para>For security reasons, running the <application>rsync</application>
|
---|
| 74 | server as an unprivileged user and group is encouraged. If you intend to
|
---|
| 75 | run <command>rsync</command> as a daemon, create the
|
---|
| 76 | <systemitem class="username">rsyncd</systemitem> user and group
|
---|
[bccbdaea] | 77 | with the following commands issued by the
|
---|
[fdf798a6] | 78 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[5ab6e72] | 79 |
|
---|
[fdf798a6] | 80 | <screen role="root"><userinput>groupadd -g 48 rsyncd &&
|
---|
| 81 | useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd \
|
---|
| 82 | -s /bin/false -u 48 rsyncd</userinput></screen>
|
---|
[5ab6e72] | 83 |
|
---|
| 84 | <para>Install <application>rsync</application> by running the following
|
---|
| 85 | commands:</para>
|
---|
| 86 |
|
---|
| 87 | <screen><userinput>./configure --prefix=/usr &&
|
---|
[fdf798a6] | 88 | make</userinput></screen>
|
---|
| 89 |
|
---|
[9b7fb82] | 90 | <para>If you have <xref linkend="doxygen"/> installed and wish to
|
---|
| 91 | build HTML API documentation, issue:</para>
|
---|
| 92 |
|
---|
| 93 | <screen><userinput>doxygen</userinput></screen>
|
---|
| 94 |
|
---|
| 95 | <para>If you have <xref linkend="docbook-utils"/> installed and wish to
|
---|
| 96 | build the user documentation, issue any or all of the following
|
---|
| 97 | commands:</para>
|
---|
[fdf798a6] | 98 |
|
---|
| 99 | <screen><userinput>cd doc &&
|
---|
[9b7fb82] | 100 | docbook2pdf rsync.sgml &&
|
---|
| 101 | docbook2ps rsync.sgml &&
|
---|
| 102 | docbook2dvi rsync.sgml &&
|
---|
| 103 | docbook2txt rsync.sgml &&
|
---|
| 104 | docbook2html --nochunks rsync.sgml &&
|
---|
[fdf798a6] | 105 | cd ..</userinput></screen>
|
---|
| 106 |
|
---|
| 107 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 108 |
|
---|
| 109 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 110 |
|
---|
| 111 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
| 112 |
|
---|
[9b7fb82] | 113 | <para>If you built the documentation, install it using the following
|
---|
[fdf798a6] | 114 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 115 |
|
---|
[9b7fb82] | 116 | <screen role='root'><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version;/api &&
|
---|
| 117 | install -v -m644 dox/html/* /usr/share/doc/rsync-&rsync-version;/api &&
|
---|
| 118 | install -v -m644 doc/rsync.* /usr/share/doc/rsync-&rsync-version;</userinput></screen>
|
---|
[0931098] | 119 |
|
---|
[5ab6e72] | 120 | </sect2>
|
---|
[0931098] | 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 > /etc/rsyncd.conf << "EOF"
|
---|
| 147 | <literal># This is a basic rsync configuration file
|
---|
[0931098] | 148 | # It exports a single module without user authentication.
|
---|
| 149 |
|
---|
| 150 | motd file = /home/rsync/welcome.msg
|
---|
| 151 | use 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>
|
---|
| 161 | EOF</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">
|
---|
[5ab6e72] | 170 | <title>Boot Script</title>
|
---|
[0931098] | 171 |
|
---|
[5ab6e72] | 172 | <para>Note that you only want to start the
|
---|
[fdf798a6] | 173 | <application>rsync</application> server if you want to provide an
|
---|
[5ab6e72] | 174 | <application>rsync</application> archive on your local machine.
|
---|
| 175 | You don't need this script to run the
|
---|
| 176 | <application>rsync</application> client.</para>
|
---|
[fce1d8e] | 177 |
|
---|
[5ab6e72] | 178 | <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
|
---|
| 179 | script included in the
|
---|
[5254d12] | 180 | <xref linkend="bootscripts"/> package.</para>
|
---|
[0931098] | 181 |
|
---|
[5ab6e72] | 182 | <screen role="root"><userinput>make install-rsyncd</userinput></screen>
|
---|
[0931098] | 183 |
|
---|
[5ab6e72] | 184 | </sect3>
|
---|
[0931098] | 185 |
|
---|
[5ab6e72] | 186 | </sect2>
|
---|
[0931098] | 187 |
|
---|
[5ab6e72] | 188 | <sect2 role="content">
|
---|
| 189 | <title>Contents</title>
|
---|
[0931098] | 190 |
|
---|
[5ab6e72] | 191 | <segmentedlist>
|
---|
| 192 | <segtitle>Installed Program</segtitle>
|
---|
| 193 | <segtitle>Installed Libraries</segtitle>
|
---|
| 194 | <segtitle>Installed Directories</segtitle>
|
---|
[0931098] | 195 |
|
---|
[5ab6e72] | 196 | <seglistitem>
|
---|
| 197 | <seg>rsync</seg>
|
---|
| 198 | <seg>None</seg>
|
---|
[fdf798a6] | 199 | <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
|
---|
[5ab6e72] | 200 | </seglistitem>
|
---|
| 201 | </segmentedlist>
|
---|
[0931098] | 202 |
|
---|
[5ab6e72] | 203 | <variablelist>
|
---|
| 204 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 205 | <?dbfo list-presentation="list"?>
|
---|
| 206 | <?dbhtml list-presentation="table"?>
|
---|
[0931098] | 207 |
|
---|
[5ab6e72] | 208 | <varlistentry id="rsync-prog">
|
---|
| 209 | <term><command>rsync</command></term>
|
---|
| 210 | <listitem>
|
---|
| 211 | <para>is a replacement for <command>rcp</command> (and
|
---|
| 212 | <command>scp</command>) that has many more features. It uses the
|
---|
[fdf798a6] | 213 | <quote>rsync algorithm</quote> which provides a very fast method of
|
---|
| 214 | syncing remote files. It does this by sending just the differences
|
---|
| 215 | in the files across the link, without requiring that both sets of
|
---|
| 216 | files are present at one end of the link beforehand.</para>
|
---|
[5ab6e72] | 217 | <indexterm zone="rsync rsync-prog">
|
---|
| 218 | <primary sortas="b-rsync">rsync</primary>
|
---|
| 219 | </indexterm>
|
---|
| 220 | </listitem>
|
---|
| 221 | </varlistentry>
|
---|
[0931098] | 222 |
|
---|
[5ab6e72] | 223 | </variablelist>
|
---|
[46cef72] | 224 |
|
---|
[5ab6e72] | 225 | </sect2>
|
---|
[46cef72] | 226 |
|
---|
[5ab6e72] | 227 | </sect1>
|
---|