Imported Upstream version 3.3.1
[debian/amanda] / man / xml-source / amsamba.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 <refentry id='amsamba.8'>
11
12 <refmeta>
13 <refentrytitle>amsamba</refentrytitle>
14 <manvolnum>8</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.8;
18 </refmeta>
19 <refnamediv>
20 <refname>amsamba</refname>
21 <refpurpose>Amanda Application to interface with smbclient</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.jlm;
25 </refentryinfo>
26 <!-- body begins here -->
27
28 <refsect1><title>DESCRIPTION</title>
29
30 <para>Amsamba is an Amanda Application API script.  It should not be run
31 by users directly.  It uses smbclient to backup and restore data.</para>
32
33 <para> The  <emphasis remap='B'>diskdevice</emphasis> in the disklist (DLE)
34 must have the form
35 '//CIFSHOST/SHARE/SUBDIR' where CIFSHOST is the CIFS host containing the data
36 to be backed up, SHARE is the share to connect, and subdir is the subdirectory
37 to backup. '/subdir' can be ommited, in which case the complete share is
38 archived.  </para>
39
40 <para> Unlike most applications, amsamba backs up and restores data located on
41 a different system from that where amsamba itself runs.  The host containing
42 the data is the CIFS host.  In practice, amsamba is usually run on the same
43 system as the Amanda server, with a DLE like
44 <programlisting>
45 localhost "//CIFSHOST/SHARENAME" amsamba-dumptype
46 </programlisting>
47 </para>
48
49 <para> Include or exclude can be used, but not both. The path for 'exclude
50 list' or 'include list' must be absolute path on the CIFS host. The estimate
51 calculates the complete size of the share, without regard for include or
52 exclude directives.  It will be larger than the actual dump if you use include
53 or exclude. Using 'estimate server' in the dumptype could give better estimate.
54 </para>
55
56 </refsect1>
57
58 <refsect1><title>PROPERTIES</title>
59
60 <para>This section lists the properties that control amsamba's functionality.
61 See <manref name="amanda-applications" vol="7"/>
62 for information on application properties and how they are configured.</para>
63
64 <!-- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER -->
65 <variablelist>
66  <!-- ==== -->
67  <varlistentry><term>SMBCLIENT-PATH</term><listitem>
68 The path to the smbclient binary.  The default is set when Amanda is built by the 
69 --with-smbclient configure option.
70 </listitem></varlistentry>
71  <!-- ==== -->
72  <varlistentry><term>GNUTAR-PATH</term><listitem>
73 The path to the gnutar binary.  The default is set when Amanda is built by the 
74 --with-gnutar configure option. gnutar is used to create the index.
75 </listitem></varlistentry>
76  <!-- ==== -->
77  <varlistentry><term>AMANDAPASS</term><listitem>
78 Location of the amandapass file, defaulting to "$CONFIG_DIR/amandapass".
79 Relative pathnames are relative to the configuration directory,
80 "$CONFIG_DIR/&lt;config&gt;". 
81 Note that this file is located on the client, not on the server.
82 The format of the file is as follow:
83 <programlisting>
84   Sharename User%Password Domain
85 </programlisting>
86 Sharename is '//HOST/SHARE' without the SUBDIR.
87 Sharename can be quoted,
88 it can be '*' to match all share,
89 it can be '//pc-host/*' to match all share on pc-host.
90 User is the username use to connect to the share.
91 Password is the password use to connect to the share.
92 '%Password' is optional if the user can connect to the share without password.
93 'User%Password' is optional, the user 'guest' without password is use to connect to the share.
94 Domain is optional. Example:
95 <programlisting>
96   //another-pc/share otheruser%otherpw domain
97   //another-pc/share otheruser%otherpw
98   //another-pc/share myuser mydomain
99   //another-pc/share myuser
100   //another-pc/share
101 </programlisting>
102 </listitem></varlistentry>
103  <!-- ==== -->
104  <varlistentry><term>ALLOW-ANONYMOUS</term><listitem>
105 This username without password is used to connect to the share if no matching entry is found in the amandapass file.
106 </listitem></varlistentry>
107  <!-- ==== -->
108  <varlistentry><term>DIRECTORY</term><listitem>
109 For restore command only, the data is recoved in that directory. Must be a unix path for "tar" RECOVER-MODE or a smb path for "smb" recover-MODE.
110 </listitem></varlistentry>
111  <!-- ==== -->
112  <varlistentry><term>RECOVER-MODE</term><listitem>
113 "tar" or "smb", default to "tar". If "tar", the data is recovered on the local machine, If "smb", the data is recovered on the smb client machine.
114 </listitem></varlistentry>
115 </variablelist>
116
117 </refsect1>
118
119 <refsect1><title>INCLUDE AND EXCLUDE LISTS</title>
120
121 <para>This application supplies exclude lists via the
122 <command>smbclient</command> <option>-TX</option> option.  Normal shell-style
123 wildcard expressions, using * and ?, are not supported.  All expressions are
124 matched only from the base directory of the DLE.  Expressions that match a
125 directory may have a leading or trailing "/".  Example expressions:
126 <programlisting>
127   ./temp-files           # exclude top-level dir "temp-files" entirely
128   ./temp-files/          # same
129   /temp-files            # same
130   temp-files             # same
131   ./temp-files/*         # BAD: does nothing
132   *.iso                  # BAD: does nothing
133   proxy/local/cache      # exclude "cache" in dir "proxy/local"
134 </programlisting>
135 </para>
136
137 <para>Include lists are supported only if excludes are not given.  They are
138 handled via the <command>smbclient</command> <option>-TI</option> option.
139 Include matching is identical to the exclude matching described above.</para>
140
141 </refsect1>
142
143 <refsect1><title>EXAMPLE</title>
144 <programlisting>
145   define application app_amsamba {
146     property "SMBCLIENT-PATH" "/usr/bin/smbclient"
147     property "GNUTAR-PATH" "/bin/tar"
148     property "AMANDAPASS" /etc/amandapass"
149     property "ALLOW-ANONYMOUS" "guest"
150   }
151 </programlisting>
152 </refsect1>
153
154 <seealso>
155 <manref name="amanda.conf" vol="5"/>,
156 <manref name="amanda-applications" vol="7"/>
157 </seealso>
158 </refentry>