<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
  <!ENTITY package "coda_replay">
  <!ENTITY date    "April 2004">
]>

<refentry>
<refentryinfo>
    <address><email>coda@cs.cmu.edu</email></address>
    <copyright>
	<year>1990-2004</year>
	<holder>Carnegie Mellon University</holder>
    </copyright>
    <date>&date;</date>
</refentryinfo>

<refmeta>
    <refentrytitle>&package;</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo>Coda Distributed File System</refmiscinfo>
</refmeta>

<refnamediv>
    <refname>&package;</refname>
    <refpurpose>Manual reintegration tool</refpurpose>
</refnamediv>

<refsynopsisdiv>
    <cmdsynopsis>
	<command>&package;</command>
	<arg><replaceable>key</replaceable></arg>
	<arg choice=req><replaceable>filename</replaceable></arg>
    </cmdsynopsis>
</refsynopsisdiv>

<refsect1>
    <title>DESCRIPTION</title>
    <para> <command>coda_replay</command> is a tool for manually reintegrating
    operations done at a disconnected client.  It provides a superset of the
    functionality of the tape-archive program, tar(1).  The
    <option>key</option> argument is a string of characters containing exactly
    one function letter and possibly one or more function modifiers.  The
    <replaceable>filename</replaceable> argument specifies the tar/replay
    format file containing the operations to be replayed.
    </para>
    <para>The function portion of the key is specified by one of the following
    letters:
    </para>
    <variablelist>
	<varlistentry>
	<term><option>r</option></term>
	<listitem>
	    <para>Replay all operations specified in the file.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>s</option></term>
	<listitem>
	    <para> Strip out non-tar operations from the file and replay only
	    the tar operations.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>t</option></term>
	<listitem>
	    <para>Do not replay but simply list the operations specified in
	    the file.</para>
	</listitem>
	</varlistentry>
    </variablelist>

    <para>The following characters may be used in addition to the letter which
    selects the function desired:
    </para>

    <variablelist>
	<varlistentry>
	<term><option>v</option></term>
	<listitem>
	    <para>Be verbose about the operations.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>h</option></term>
	<listitem>
	    <para>Be harsh in replay, i.e., abort the program if any replayed
	    operation fails.</para>
	</listitem>
	</varlistentry>
    </variablelist>

    <para><command>coda_replay</command> can handle normal tar files since it
    invokes tar to perform <emphasis>create</emphasis>,
    <emphasis>link</emphasis>, and <emphasis>symlink</emphasis> operations.
    However, its main purpose is to replay checkpoint files saved by the Coda
    cache manager, Venus, during disconnected operation. These files may
    contain operations unknown to tar: <emphasis>setattr</emphasis>,
    <emphasis>unlink</emphasis>, <emphasis>rename</emphasis>,
    <emphasis>mkdir</emphasis>, and <emphasis>rmdir</emphasis>.
    These other operations are encoded in the tar file by overloading the
    linkflag and linkname fields. Consult the replay.h header file for more
    details.
    </para>
</refsect1>

<refsect1>
    <title>BUGS</title>
    <para>
    <itemizedlist>
    <listitem><para>There is a limit of 100 characters imposed on filename
    length by tar.</para>
    </listitem>
    <listitem><para>Filenames in checkpoint files generated by Venus are all
    relative to the enclosing volume root.</para>
    </listitem>
    </itemizedlist>
    </para>
</refsect1>

<refsect1>
    <title>SEE ALSO</title>
    <para>
    <citerefentry>
	<refentrytitle>tar</refentrytitle>
	<manvolnum>1</manvolnum>
    </citerefentry>,
    <citerefentry>
	<refentrytitle>tar</refentrytitle>
	<manvolnum>5</manvolnum>
    </citerefentry>,
    <citerefentry>
	<refentrytitle>venus</refentrytitle>
	<manvolnum>8</manvolnum>
    </citerefentry>
    </para>
</refsect1>

<refsect1>
    <title>AUTHORS</title>
    <para>
    <itemizedlist>
    <listitem><para>Jay Kistler, 1990, Created</para>
    </listitem>
    <listitem><para>Jan Harkes, 2004, converted to DocBook 4.1</para>
    </listitem>
    </itemizedlist>
    </para>
</refsect1>
</refentry>

