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 '../entities/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='plain'><replaceable>hostname</replaceable></arg>
33 <arg choice='plain'><replaceable>auth</replaceable></arg>
34 <arg choice='plain'><replaceable>service</replaceable></arg>
35 <arg choice='opt'><arg choice='plain'>-f</arg><arg choice='plain'><replaceable>input_file</replaceable></arg></arg>
36 <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
41 <refsect1><title>DESCRIPTION</title>
42 <para><emphasis remap='B'>Amservice</emphasis>
43 execute an &A; 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 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
49 man page for more details about &A;.</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><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
83 <para>See the "<emphasis remap='B'>CONFIGURATION OVERRIDE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
90 <refsect1><title>EXAMPLE</title>
92 <para>The noop service is easy to execute because it does not require a REQ packet:</para>
93 <programlisting>amservice hostname bsdtcp noop < /dev/null</programlisting>
94 <para>The example executes the noop service on the client using bsdtcp auth.
95 This is useful for debugging connection problems.
96 It print an OPTIONS line upon success.</para>
98 <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>
101 <refsect1><title>EXIT CODE</title>
102 The exit code of <command>amservice</command> is one of:
105 1 = error executing amandad on the client.
107 <para>As <command>amservice</command> doesn't parse the REP packet,
108 it can only detect failures in executing amandad on the client.
109 <command>amservice</command> can exit with value 0 even if the user
110 is not authorized to execute the service. An error message will be printed.
114 <refsect1><title>SEE ALSO</title>
115 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
116 <citerefentry><refentrytitle>amcheck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
117 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
118 <citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>