Imported Upstream version 3.3.0
[debian/amanda] / man / xml-source / amservice.8.xml
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"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM 'global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11
12 <refentry id='amservice.8'>
13
14 <refmeta>
15 <refentrytitle>amservice</refentrytitle>
16 <manvolnum>8</manvolnum>
17 &rmi.source;
18 &rmi.version;
19 &rmi.manual.8;
20 </refmeta>
21 <refnamediv>
22 <refname>amservice</refname>
23 <refpurpose>run an amanda service on a client</refpurpose>
24 </refnamediv>
25 <refentryinfo>
26 &author.jlm;
27 </refentryinfo>
28 <!-- body begins here -->
29 <refsynopsisdiv>
30 <cmdsynopsis>
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>
37 </cmdsynopsis>
38 </refsynopsisdiv>
39
40
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>
47 <para>See the
48 <manref name="amanda" vol="8"/>
49 man page for more details about Amanda.</para>
50 </refsect1>
51
52 <refsect1><title>OPTIONS</title>
53 <variablelist remap='TP'>
54   <varlistentry>
55   <term><emphasis remap='B'>hostname</emphasis></term>
56   <listitem>
57 <para>The hostname of the client.</para>
58   </listitem>
59   </varlistentry>
60   <varlistentry>
61   <term><option>auth</option></term>
62   <listitem>
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>
65   </listitem>
66   </varlistentry>
67   <varlistentry>
68   <term><option>service</option></term>
69   <listitem>
70 <para>The amanda service to execute on the client. One of noop, selfcheck or sendsize.</para>
71   </listitem>
72   </varlistentry>
73   <varlistentry>
74   <term><option>-f input_file</option></term>
75   <listitem>
76 <para>Use the file input_file instead of stdin to read the REQ packet from.</para>
77   </listitem>
78   </varlistentry>
79
80   <varlistentry>
81   <term><option>-s</option></term>
82   <listitem>
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>
84   </listitem>
85   </varlistentry>
86
87   &configoverride.varlistentry;
88
89 </variablelist>
90 </refsect1>
91
92 <refsect1><title>EXAMPLE</title>
93
94 <para>The noop service is easy to execute because it does not require a REQ packet:</para>
95 <programlisting>amservice hostname bsdtcp noop &lt; /dev/null
96 </programlisting>
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>
100
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>
102 </refsect1>
103
104 <refsect1><title>EXIT CODE</title>
105 The exit code of <command>amservice</command> is one of:
106 <programlisting>
107  0  = success
108  1  = error executing amandad on the client.
109 </programlisting>
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.
114 </para>
115 </refsect1>
116
117 <seealso>
118 <manref name="amanda" vol="8"/>,
119 <manref name="amcheck" vol="8"/>,
120 <manref name="amdump" vol="8"/>,
121 <manref name="amadmin" vol="8"/>
122 </seealso>
123
124 </refentry>
125