[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[0931098] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[4ec808b] | 7 | <!ENTITY rsync-download-http "http://samba.org/ftp/rsync/old-versions/rsync-&rsync-version;.tar.gz">
|
---|
[12967d4] | 8 | <!ENTITY rsync-download-ftp "ftp://ftp.samba.org/pub/rsync/rsync-&rsync-version;.tar.gz">
|
---|
[df6c6693] | 9 | <!ENTITY rsync-md5sum "082a9dba1f741e6591e5cd748a1233de">
|
---|
| 10 | <!ENTITY rsync-size "760 KB">
|
---|
| 11 | <!ENTITY rsync-buildsize "6.2 MB">
|
---|
[fdf798a6] | 12 | <!ENTITY rsync-time "0.2 SBU">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[df6c6693] | 15 | <!-- Note: time and space to build docs is negligible -->
|
---|
| 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>
|
---|
[a6ac43b] | 63 | <para role="optional"><xref linkend="popt"/> and
|
---|
[fdf798a6] | 64 | <xref linkend="docbook-utils"/></para>
|
---|
[5ab6e72] | 65 |
|
---|
[3cb0c57] | 66 | <para condition="html" role="usernotes">User Notes:
|
---|
| 67 | <ulink url="&blfs-wiki;/rsync"/></para>
|
---|
| 68 |
|
---|
[5ab6e72] | 69 | </sect2>
|
---|
| 70 |
|
---|
| 71 | <sect2 role="installation">
|
---|
| 72 | <title>Installation of rsync</title>
|
---|
| 73 |
|
---|
| 74 | <para>For security reasons, running the <application>rsync</application>
|
---|
| 75 | server as an unprivileged user and group is encouraged. If you intend to
|
---|
| 76 | run <command>rsync</command> as a daemon, create the
|
---|
| 77 | <systemitem class="username">rsyncd</systemitem> user and group
|
---|
[bccbdaea] | 78 | with the following commands issued by the
|
---|
[fdf798a6] | 79 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[5ab6e72] | 80 |
|
---|
[fdf798a6] | 81 | <screen role="root"><userinput>groupadd -g 48 rsyncd &&
|
---|
| 82 | useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd \
|
---|
| 83 | -s /bin/false -u 48 rsyncd</userinput></screen>
|
---|
[5ab6e72] | 84 |
|
---|
| 85 | <para>Install <application>rsync</application> by running the following
|
---|
| 86 | commands:</para>
|
---|
| 87 |
|
---|
| 88 | <screen><userinput>./configure --prefix=/usr &&
|
---|
[fdf798a6] | 89 | make</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <para>If you have DocBook-Utils installed and wish to build HTML
|
---|
| 92 | documentation, issue:</para>
|
---|
| 93 |
|
---|
| 94 | <screen><userinput>cd doc &&
|
---|
| 95 | docbook2html rsync.sgml &&
|
---|
| 96 | cd ..</userinput></screen>
|
---|
| 97 |
|
---|
| 98 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 99 |
|
---|
| 100 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 101 |
|
---|
| 102 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
| 103 |
|
---|
| 104 | <para>If you built the HTML documentation, install it using the following
|
---|
| 105 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 106 |
|
---|
| 107 | <screen role='root'><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version; &&
|
---|
| 108 | install -v -m644 doc/*.html /usr/share/doc/rsync-&rsync-version;</userinput></screen>
|
---|
[0931098] | 109 |
|
---|
[5ab6e72] | 110 | </sect2>
|
---|
[0931098] | 111 |
|
---|
[5ab6e72] | 112 | <sect2 role="configuration">
|
---|
| 113 | <title>Configuring rsync</title>
|
---|
[0931098] | 114 |
|
---|
[5ab6e72] | 115 | <sect3 id="rsync-config">
|
---|
| 116 | <title>Config Files</title>
|
---|
[0931098] | 117 |
|
---|
[5ab6e72] | 118 | <para><filename>/etc/rsyncd.conf</filename></para>
|
---|
[0931098] | 119 |
|
---|
[5ab6e72] | 120 | <indexterm zone="rsync rsync-config">
|
---|
| 121 | <primary sortas="e-etc-rsyncd.conf">/etc/rsyncd.conf</primary>
|
---|
| 122 | </indexterm>
|
---|
| 123 |
|
---|
| 124 | </sect3>
|
---|
| 125 |
|
---|
| 126 | <sect3>
|
---|
| 127 | <title>Configuration Information</title>
|
---|
| 128 |
|
---|
[bccbdaea] | 129 | <para>For client access to remote files, you may need to install the
|
---|
[fdf798a6] | 130 | <xref linkend="openssh"/> package to connect to the remote server.</para>
|
---|
| 131 |
|
---|
[bccbdaea] | 132 | <para>This is a simple download-only configuration to set up running
|
---|
[fdf798a6] | 133 | <command>rsync</command> as a server. See the rsyncd.conf(5)
|
---|
[5ab6e72] | 134 | man-page for additional options (i.e., user authentication).</para>
|
---|
| 135 |
|
---|
| 136 | <screen role="root"><userinput>cat > /etc/rsyncd.conf << "EOF"
|
---|
| 137 | <literal># This is a basic rsync configuration file
|
---|
[0931098] | 138 | # It exports a single module without user authentication.
|
---|
| 139 |
|
---|
| 140 | motd file = /home/rsync/welcome.msg
|
---|
| 141 | use chroot = yes
|
---|
| 142 |
|
---|
| 143 | [localhost]
|
---|
| 144 | path = /home/rsync
|
---|
| 145 | comment = Default rsync module
|
---|
| 146 | read only = yes
|
---|
| 147 | list = yes
|
---|
| 148 | uid = rsyncd
|
---|
| 149 | gid = rsyncd
|
---|
[5ab6e72] | 150 | </literal>
|
---|
| 151 | EOF</userinput></screen>
|
---|
[0931098] | 152 |
|
---|
[fdf798a6] | 153 | <para>You can find additional configuration information and general
|
---|
| 154 | documentation about <command>rsync</command> at
|
---|
| 155 | <ulink url="http://rsync.samba.org/documentation.html"/>.</para>
|
---|
[bccbdaea] | 156 |
|
---|
[5ab6e72] | 157 | </sect3>
|
---|
[0931098] | 158 |
|
---|
[fdf798a6] | 159 | <sect3 id="rsync-init">
|
---|
[5ab6e72] | 160 | <title>Boot Script</title>
|
---|
[0931098] | 161 |
|
---|
[5ab6e72] | 162 | <para>Note that you only want to start the
|
---|
[fdf798a6] | 163 | <application>rsync</application> server if you want to provide an
|
---|
[5ab6e72] | 164 | <application>rsync</application> archive on your local machine.
|
---|
| 165 | You don't need this script to run the
|
---|
| 166 | <application>rsync</application> client.</para>
|
---|
[fce1d8e] | 167 |
|
---|
[5ab6e72] | 168 | <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
|
---|
| 169 | script included in the
|
---|
[5254d12] | 170 | <xref linkend="bootscripts"/> package.</para>
|
---|
[0931098] | 171 |
|
---|
[5ab6e72] | 172 | <screen role="root"><userinput>make install-rsyncd</userinput></screen>
|
---|
[0931098] | 173 |
|
---|
[5ab6e72] | 174 | </sect3>
|
---|
[0931098] | 175 |
|
---|
[5ab6e72] | 176 | </sect2>
|
---|
[0931098] | 177 |
|
---|
[5ab6e72] | 178 | <sect2 role="content">
|
---|
| 179 | <title>Contents</title>
|
---|
[0931098] | 180 |
|
---|
[5ab6e72] | 181 | <segmentedlist>
|
---|
| 182 | <segtitle>Installed Program</segtitle>
|
---|
| 183 | <segtitle>Installed Libraries</segtitle>
|
---|
| 184 | <segtitle>Installed Directories</segtitle>
|
---|
[0931098] | 185 |
|
---|
[5ab6e72] | 186 | <seglistitem>
|
---|
| 187 | <seg>rsync</seg>
|
---|
| 188 | <seg>None</seg>
|
---|
[fdf798a6] | 189 | <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
|
---|
[5ab6e72] | 190 | </seglistitem>
|
---|
| 191 | </segmentedlist>
|
---|
[0931098] | 192 |
|
---|
[5ab6e72] | 193 | <variablelist>
|
---|
| 194 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 195 | <?dbfo list-presentation="list"?>
|
---|
| 196 | <?dbhtml list-presentation="table"?>
|
---|
[0931098] | 197 |
|
---|
[5ab6e72] | 198 | <varlistentry id="rsync-prog">
|
---|
| 199 | <term><command>rsync</command></term>
|
---|
| 200 | <listitem>
|
---|
| 201 | <para>is a replacement for <command>rcp</command> (and
|
---|
| 202 | <command>scp</command>) that has many more features. It uses the
|
---|
[fdf798a6] | 203 | <quote>rsync algorithm</quote> which provides a very fast method of
|
---|
| 204 | syncing remote files. It does this by sending just the differences
|
---|
| 205 | in the files across the link, without requiring that both sets of
|
---|
| 206 | files are present at one end of the link beforehand.</para>
|
---|
[5ab6e72] | 207 | <indexterm zone="rsync rsync-prog">
|
---|
| 208 | <primary sortas="b-rsync">rsync</primary>
|
---|
| 209 | </indexterm>
|
---|
| 210 | </listitem>
|
---|
| 211 | </varlistentry>
|
---|
[0931098] | 212 |
|
---|
[5ab6e72] | 213 | </variablelist>
|
---|
[46cef72] | 214 |
|
---|
[5ab6e72] | 215 | </sect2>
|
---|
[46cef72] | 216 |
|
---|
[5ab6e72] | 217 | </sect1>
|
---|