[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 |
|
---|
[1e642794] | 7 | <!-- <!ENTITY rsync-download-http "http://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 "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/rsync-&rsync-version;.tar.gz">
|
---|
| 11 | <!ENTITY rsync-md5sum "082a9dba1f741e6591e5cd748a1233de">
|
---|
| 12 | <!ENTITY rsync-size "760 KB">
|
---|
| 13 | <!ENTITY rsync-buildsize "6.2 MB">
|
---|
| 14 | <!ENTITY rsync-time "0.2 SBU">
|
---|
[0931098] | 15 | ]>
|
---|
| 16 |
|
---|
[df6c6693] | 17 | <!-- Note: time and space to build docs is negligible -->
|
---|
| 18 |
|
---|
[46cef72] | 19 | <sect1 id="rsync" xreflabel="rsync-&rsync-version;">
|
---|
[5ab6e72] | 20 | <?dbhtml filename="rsync.html"?>
|
---|
| 21 |
|
---|
| 22 | <sect1info>
|
---|
| 23 | <othername>$LastChangedBy$</othername>
|
---|
| 24 | <date>$Date$</date>
|
---|
| 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>rsync-&rsync-version;</title>
|
---|
| 28 |
|
---|
| 29 | <indexterm zone="rsync">
|
---|
| 30 | <primary sortas="a-rsync">rsync</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to rsync</title>
|
---|
| 35 |
|
---|
| 36 | <para>The <application>rsync</application> package contains the
|
---|
| 37 | <command>rsync</command> utility. This is useful for synchronizing large
|
---|
| 38 | file archives over a network.</para>
|
---|
| 39 |
|
---|
| 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (HTTP): <ulink url="&rsync-download-http;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download (FTP): <ulink url="&rsync-download-ftp;"/></para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download MD5 sum: &rsync-md5sum;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download size: &rsync-size;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated disk space required: &rsync-buildsize;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Estimated build time: &rsync-time;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </itemizedlist>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect3">rsync Dependencies</bridgehead>
|
---|
| 63 |
|
---|
| 64 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a6ac43b] | 65 | <para role="optional"><xref linkend="popt"/> and
|
---|
[fdf798a6] | 66 | <xref linkend="docbook-utils"/></para>
|
---|
[5ab6e72] | 67 |
|
---|
[3cb0c57] | 68 | <para condition="html" role="usernotes">User Notes:
|
---|
| 69 | <ulink url="&blfs-wiki;/rsync"/></para>
|
---|
| 70 |
|
---|
[5ab6e72] | 71 | </sect2>
|
---|
| 72 |
|
---|
| 73 | <sect2 role="installation">
|
---|
| 74 | <title>Installation of rsync</title>
|
---|
| 75 |
|
---|
| 76 | <para>For security reasons, running the <application>rsync</application>
|
---|
| 77 | server as an unprivileged user and group is encouraged. If you intend to
|
---|
| 78 | run <command>rsync</command> as a daemon, create the
|
---|
| 79 | <systemitem class="username">rsyncd</systemitem> user and group
|
---|
[bccbdaea] | 80 | with the following commands issued by the
|
---|
[fdf798a6] | 81 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[5ab6e72] | 82 |
|
---|
[fdf798a6] | 83 | <screen role="root"><userinput>groupadd -g 48 rsyncd &&
|
---|
| 84 | useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd \
|
---|
| 85 | -s /bin/false -u 48 rsyncd</userinput></screen>
|
---|
[5ab6e72] | 86 |
|
---|
| 87 | <para>Install <application>rsync</application> by running the following
|
---|
| 88 | commands:</para>
|
---|
| 89 |
|
---|
| 90 | <screen><userinput>./configure --prefix=/usr &&
|
---|
[fdf798a6] | 91 | make</userinput></screen>
|
---|
| 92 |
|
---|
| 93 | <para>If you have DocBook-Utils installed and wish to build HTML
|
---|
| 94 | documentation, issue:</para>
|
---|
| 95 |
|
---|
| 96 | <screen><userinput>cd doc &&
|
---|
| 97 | docbook2html rsync.sgml &&
|
---|
| 98 | cd ..</userinput></screen>
|
---|
| 99 |
|
---|
| 100 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 101 |
|
---|
| 102 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 103 |
|
---|
| 104 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
| 105 |
|
---|
| 106 | <para>If you built the HTML documentation, install it using the following
|
---|
| 107 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 108 |
|
---|
| 109 | <screen role='root'><userinput>install -v -m755 -d /usr/share/doc/rsync-&rsync-version; &&
|
---|
| 110 | install -v -m644 doc/*.html /usr/share/doc/rsync-&rsync-version;</userinput></screen>
|
---|
[0931098] | 111 |
|
---|
[5ab6e72] | 112 | </sect2>
|
---|
[0931098] | 113 |
|
---|
[5ab6e72] | 114 | <sect2 role="configuration">
|
---|
| 115 | <title>Configuring rsync</title>
|
---|
[0931098] | 116 |
|
---|
[5ab6e72] | 117 | <sect3 id="rsync-config">
|
---|
| 118 | <title>Config Files</title>
|
---|
[0931098] | 119 |
|
---|
[5ab6e72] | 120 | <para><filename>/etc/rsyncd.conf</filename></para>
|
---|
[0931098] | 121 |
|
---|
[5ab6e72] | 122 | <indexterm zone="rsync rsync-config">
|
---|
| 123 | <primary sortas="e-etc-rsyncd.conf">/etc/rsyncd.conf</primary>
|
---|
| 124 | </indexterm>
|
---|
| 125 |
|
---|
| 126 | </sect3>
|
---|
| 127 |
|
---|
| 128 | <sect3>
|
---|
| 129 | <title>Configuration Information</title>
|
---|
| 130 |
|
---|
[bccbdaea] | 131 | <para>For client access to remote files, you may need to install the
|
---|
[fdf798a6] | 132 | <xref linkend="openssh"/> package to connect to the remote server.</para>
|
---|
| 133 |
|
---|
[bccbdaea] | 134 | <para>This is a simple download-only configuration to set up running
|
---|
[fdf798a6] | 135 | <command>rsync</command> as a server. See the rsyncd.conf(5)
|
---|
[5ab6e72] | 136 | man-page for additional options (i.e., user authentication).</para>
|
---|
| 137 |
|
---|
| 138 | <screen role="root"><userinput>cat > /etc/rsyncd.conf << "EOF"
|
---|
| 139 | <literal># This is a basic rsync configuration file
|
---|
[0931098] | 140 | # It exports a single module without user authentication.
|
---|
| 141 |
|
---|
| 142 | motd file = /home/rsync/welcome.msg
|
---|
| 143 | use chroot = yes
|
---|
| 144 |
|
---|
| 145 | [localhost]
|
---|
| 146 | path = /home/rsync
|
---|
| 147 | comment = Default rsync module
|
---|
| 148 | read only = yes
|
---|
| 149 | list = yes
|
---|
| 150 | uid = rsyncd
|
---|
| 151 | gid = rsyncd
|
---|
[5ab6e72] | 152 | </literal>
|
---|
| 153 | EOF</userinput></screen>
|
---|
[0931098] | 154 |
|
---|
[fdf798a6] | 155 | <para>You can find additional configuration information and general
|
---|
| 156 | documentation about <command>rsync</command> at
|
---|
| 157 | <ulink url="http://rsync.samba.org/documentation.html"/>.</para>
|
---|
[bccbdaea] | 158 |
|
---|
[5ab6e72] | 159 | </sect3>
|
---|
[0931098] | 160 |
|
---|
[fdf798a6] | 161 | <sect3 id="rsync-init">
|
---|
[5ab6e72] | 162 | <title>Boot Script</title>
|
---|
[0931098] | 163 |
|
---|
[5ab6e72] | 164 | <para>Note that you only want to start the
|
---|
[fdf798a6] | 165 | <application>rsync</application> server if you want to provide an
|
---|
[5ab6e72] | 166 | <application>rsync</application> archive on your local machine.
|
---|
| 167 | You don't need this script to run the
|
---|
| 168 | <application>rsync</application> client.</para>
|
---|
[fce1d8e] | 169 |
|
---|
[5ab6e72] | 170 | <para>Install the <filename>/etc/rc.d/init.d/rsyncd</filename> init
|
---|
| 171 | script included in the
|
---|
[5254d12] | 172 | <xref linkend="bootscripts"/> package.</para>
|
---|
[0931098] | 173 |
|
---|
[5ab6e72] | 174 | <screen role="root"><userinput>make install-rsyncd</userinput></screen>
|
---|
[0931098] | 175 |
|
---|
[5ab6e72] | 176 | </sect3>
|
---|
[0931098] | 177 |
|
---|
[5ab6e72] | 178 | </sect2>
|
---|
[0931098] | 179 |
|
---|
[5ab6e72] | 180 | <sect2 role="content">
|
---|
| 181 | <title>Contents</title>
|
---|
[0931098] | 182 |
|
---|
[5ab6e72] | 183 | <segmentedlist>
|
---|
| 184 | <segtitle>Installed Program</segtitle>
|
---|
| 185 | <segtitle>Installed Libraries</segtitle>
|
---|
| 186 | <segtitle>Installed Directories</segtitle>
|
---|
[0931098] | 187 |
|
---|
[5ab6e72] | 188 | <seglistitem>
|
---|
| 189 | <seg>rsync</seg>
|
---|
| 190 | <seg>None</seg>
|
---|
[fdf798a6] | 191 | <seg>Optionally, /usr/share/doc/rsync-&rsync-version;</seg>
|
---|
[5ab6e72] | 192 | </seglistitem>
|
---|
| 193 | </segmentedlist>
|
---|
[0931098] | 194 |
|
---|
[5ab6e72] | 195 | <variablelist>
|
---|
| 196 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 197 | <?dbfo list-presentation="list"?>
|
---|
| 198 | <?dbhtml list-presentation="table"?>
|
---|
[0931098] | 199 |
|
---|
[5ab6e72] | 200 | <varlistentry id="rsync-prog">
|
---|
| 201 | <term><command>rsync</command></term>
|
---|
| 202 | <listitem>
|
---|
| 203 | <para>is a replacement for <command>rcp</command> (and
|
---|
| 204 | <command>scp</command>) that has many more features. It uses the
|
---|
[fdf798a6] | 205 | <quote>rsync algorithm</quote> which provides a very fast method of
|
---|
| 206 | syncing remote files. It does this by sending just the differences
|
---|
| 207 | in the files across the link, without requiring that both sets of
|
---|
| 208 | files are present at one end of the link beforehand.</para>
|
---|
[5ab6e72] | 209 | <indexterm zone="rsync rsync-prog">
|
---|
| 210 | <primary sortas="b-rsync">rsync</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
[0931098] | 214 |
|
---|
[5ab6e72] | 215 | </variablelist>
|
---|
[46cef72] | 216 |
|
---|
[5ab6e72] | 217 | </sect2>
|
---|
[46cef72] | 218 |
|
---|
[5ab6e72] | 219 | </sect1>
|
---|