1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <!-- lifted from troff+man by doclifter -->
12 <refentry id='amservice.8'>
15 <refentrytitle>amservice</refentrytitle>
16 <manvolnum>8</manvolnum>
22 <refname>amservice</refname>
23 <refpurpose>run an amanda service on a client</refpurpose>
28 <!-- body begins here -->
31 <command>amservice</command>
32 <arg choice='opt'><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>input_file</replaceable></arg><arg choice='opt'>-s</arg></arg>
33 &configoverride.synopsis;
34 <arg choice='plain'><replaceable>hostname</replaceable></arg>
35 <arg choice='plain'><replaceable>auth</replaceable></arg>
36 <arg choice='plain'><replaceable>service</replaceable></arg>
41 <refsect1><title>DESCRIPTION</title>
42 <para><emphasis remap='B'>Amservice</emphasis>
43 execute an Amanda service on a client.
44 It can be used without amanda server configuration (amanda.conf and disklist).
45 It can be used to check communication between a server and a client.
46 Amservice reads stdin to capture the REQ packet to send to the client.</para>
48 <manref name="amanda" vol="8"/>
49 man page for more details about Amanda.</para>
52 <refsect1><title>OPTIONS</title>
53 <variablelist remap='TP'>
55 <term><emphasis remap='B'>hostname</emphasis></term>
57 <para>The hostname of the client.</para>
61 <term><option>auth</option></term>
63 <para>The auth to use, one of: bsd, bsdudp, bsdtcp, ssh, rsh or krb5.
64 The client must be configured with this auth.</para>
68 <term><option>service</option></term>
70 <para>The amanda service to execute on the client. One of noop, selfcheck or sendsize.</para>
74 <term><option>-f input_file</option></term>
76 <para>Use the file input_file instead of stdin to read the REQ packet from.</para>
81 <term><option>-s</option></term>
83 <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>
87 &configoverride.varlistentry;
92 <refsect1><title>EXAMPLE</title>
94 <para>The noop service is easy to execute because it does not require a REQ packet:</para>
95 <programlisting>amservice hostname bsdtcp noop < /dev/null
97 <para>The example executes the noop service on the client using bsdtcp auth.
98 This is useful for debugging connection problems.
99 It print an OPTIONS line upon success.</para>
101 <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>
104 <refsect1><title>EXIT CODE</title>
105 The exit code of <command>amservice</command> is one of:
108 1 = error executing amandad on the client.
110 <para>As <command>amservice</command> doesn't parse the REP packet,
111 it can only detect failures in executing amandad on the client.
112 <command>amservice</command> can exit with value 0 even if the user
113 is not authorized to execute the service. An error message will be printed.
118 <manref name="amanda" vol="8"/>,
119 <manref name="amcheck" vol="8"/>,
120 <manref name="amdump" vol="8"/>,
121 <manref name="amadmin" vol="8"/>