1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
[
<!-- entities files to use -->
<!ENTITY % global_entities SYSTEM 'global.entities'>
%global_entities;
]>
<!-- lifted from troff+man by doclifter -->
<refentry id='amservice.8'>
<refmeta>
<refentrytitle>amservice</refentrytitle>
<manvolnum>8</manvolnum>
&rmi.source;
&rmi.version;
&rmi.manual.8;
</refmeta>
<refnamediv>
<refname>amservice</refname>
<refpurpose>run an amanda service on a client</refpurpose>
</refnamediv>
<refentryinfo>
&author.jlm;
</refentryinfo>
<!-- body begins here -->
<refsynopsisdiv>
<cmdsynopsis>
<command>amservice</command>
<arg choice='opt'><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>input_file</replaceable></arg><arg choice='opt'>-s</arg></arg>
<arg choice='opt'><arg choice='plain'>--config</arg><arg choice='plain'><replaceable>CONFIG</replaceable></arg></arg>
<arg choice='opt'><arg choice='plain'>--features</arg><arg choice='plain'><replaceable>FEATURES-STRING</replaceable></arg></arg>
<arg choice='opt'><arg choice='plain'>--stream</arg><arg choice='plain'><replaceable>NAME,IN,OUT</replaceable></arg></arg>*
&configoverride.synopsis;
<arg choice='plain'><replaceable>hostname</replaceable></arg>
<arg choice='plain'><replaceable>auth</replaceable></arg>
<arg choice='plain'><replaceable>service</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>DESCRIPTION</title>
<para><emphasis remap='B'>Amservice</emphasis>
execute an Amanda service on a client.
It can be used without amanda server configuration (amanda.conf and disklist).
It can be used to check communication between a server and a client.
Amservice reads stdin to capture the REQ packet to send to the client.</para>
<para>See the
<manref name="amanda" vol="8"/>
man page for more details about Amanda.</para>
</refsect1>
<refsect1><title>OPTIONS</title>
<variablelist remap='TP'>
<varlistentry>
<term><emphasis remap='B'>hostname</emphasis></term>
<listitem>
<para>The hostname of the client.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>auth</option></term>
<listitem>
<para>The auth to use, one of: bsd, bsdudp, bsdtcp, ssh, rsh or krb5.
The client must be configured with this auth.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>service</option></term>
<listitem>
<para>The amanda service to execute on the client. One of noop, selfcheck or sendsize.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f input_file</option></term>
<listitem>
<para>Use the file input_file instead of stdin to read the REQ packet from.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option></term>
<listitem>
<para>Redirect the first connected stream to stdin/stdout. The -f argument is required for the REQ packet, the REP packet is not printed on stdout.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--config</option></term>
<listitem>
<para>The amanda configuration.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--features</option><arg choice='plain'><replaceable>FEATURES-STRING</replaceable></arg></term>
<listitem>
<para>The features of the remote client.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--stream</option><arg choice='plain'><replaceable>NAME,IN,OUT</replaceable></arg></term>
<listitem>
<para>The vstream to open, their name and the two file descriptors.</para>
</listitem>
</varlistentry>
&configoverride.varlistentry;
</variablelist>
</refsect1>
<refsect1><title>EXAMPLE</title>
<para>The noop service is easy to execute because it does not require a REQ packet:</para>
<programlisting>amservice hostname bsdtcp noop < /dev/null
</programlisting>
<para>The example executes the noop service on the client using bsdtcp auth.
This is useful for debugging connection problems.
It print an OPTIONS line upon success.</para>
<para>It is more difficult to execute the selfcheck or sendsize service, as these require a valid REQ packet. If you have already uccessfully run amanda, you can find valid REQ packets in the amandad.*.debug files.</para>
</refsect1>
<refsect1><title>EXIT CODE</title>
The exit code of <command>amservice</command> is one of:
<programlisting>
0 = success
1 = error executing amandad on the client.
</programlisting>
<para>As <command>amservice</command> doesn't parse the REP packet,
it can only detect failures in executing amandad on the client.
<command>amservice</command> can exit with value 0 even if the user
is not authorized to execute the service. An error message will be printed.
</para>
</refsect1>
<seealso>
<manref name="amanda" vol="8"/>,
<manref name="amcheck" vol="8"/>,
<manref name="amdump" vol="8"/>,
<manref name="amadmin" vol="8"/>
</seealso>
</refentry>
|