+<refsect1><title>SCRIPT SECTION</title>
+<para>The
+<emphasis remap='B'>amanda.conf</emphasis>
+file may define multiple types of script.
+The information is entered in a <amkeyword>script</amkeyword>
+section, which looks like this:</para>
+
+<programlisting>
+define script "<emphasis remap='I'>name</emphasis>" {
+ <emphasis remap='I'>script-option</emphasis> <emphasis remap='I'>script-value</emphasis>
+ <literal>...</literal>
+}
+</programlisting>
+<para>The { must appear at the end of a line, and the } on its own line.</para>
+
+<para><emphasis remap='I'>name</emphasis>
+is the name of this type of script. It is referenced from the
+<emphasis remap='I'>dumptype</emphasis></para>
+
+<para>The script options and values are:</para>
+<variablelist remap='TP'>
+ <varlistentry>
+ <term><amkeyword>comment</amkeyword> <amtype>string</amtype></term>
+ <listitem>
+<para>Default: not set.
+A comment string describing this script.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>plugin</amkeyword> <amtype>string</amtype></term>
+ <listitem>
+<para>No default. Must be set to the name of the program. This program must be in the <emphasis remap='I'>$libexecdir/amanda/application</emphasis> directory on the client and/or server.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>order</amkeyword> <amtype>int</amtype></term>
+ <listitem>
+<para>Default: <amdefault>5000</amdefault>. Scripts are executed in that order, it is useful if you have many scripts and they must be executed in a spefific order.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>execute-where</amkeyword> [ <amkeyword>client</amkeyword> | <amkeyword>server</amkeyword> ]</term>
+ <listitem>
+<para>Default: <amkeyword>client</amkeyword>. Where the script must be executed, on the client or server.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>execute-on</amkeyword> <amtype>execute_on</amtype> [,<amtype>execute_on</amtype>]*</term>
+ <listitem>
+<para>No default. When the script must be executed, you can specify many of them:</para>
+ <!-- .RS -->
+ <variablelist remap='TP'>
+ <varlistentry>
+ <term><amkeyword>pre-dle-amcheck</amkeyword></term>
+ <listitem>
+<para>Execute before the amcheck command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-host-amcheck</amkeyword></term>
+ <listitem>
+<para>Execute before the amcheck command for all dle for the client.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-dle-amcheck</amkeyword></term>
+ <listitem>
+<para>Execute after the amcheck command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-host-amcheck</amkeyword></term>
+ <listitem>
+<para>Execute after the amcheck command for all dle for the client.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-dle-estimate</amkeyword></term>
+ <listitem>
+<para>Execute before the estimate command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-host-estimate</amkeyword></term>
+ <listitem>
+<para>Execute before the estimate command for all dle for the client.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-dle-estimate</amkeyword></term>
+ <listitem>
+<para>Execute after the estimate command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-host-estimate</amkeyword></term>
+ <listitem>
+<para>Execute after the estimate command for all dle for the client.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-dle-backup</amkeyword></term>
+ <listitem>
+<para>Execute before the backup command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-host-backup</amkeyword></term>
+ <listitem>
+<para>Execute before the backup command for all dle for the client. It can't be run on client, it must be run on server</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-dle-backup</amkeyword></term>
+ <listitem>
+<para>Execute after the backup command for the dle.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-host-backup</amkeyword></term>
+ <listitem>
+<para>Execute after the backup command for all dle for the client. It can't be run on client, it must be run on server</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-recover</amkeyword></term>
+ <listitem>
+<para>Execute before any level is recovered.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-recover</amkeyword></term>
+ <listitem>
+<para>Execute after all levels are recovered.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>pre-level-recover</amkeyword></term>
+ <listitem>
+<para>Execute before each level recovery.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>post-level-recover</amkeyword></term>
+ <listitem>
+<para>Execute after each level recovery.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>inter-level-recover</amkeyword></term>
+ <listitem>
+<para>Execute between two levels of recovery.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>If you recover level 0 and 2 of the disk /usr with amrecover, it will execute:</para>
+<programlisting>
+script --pre-recover
+script --pre-level-recover --level 0
+#recovering level 0
+script --post-level-recover --level 0
+script --inter-level-recover --level 0 --level 2
+script --pre-level-recover --level 2
+#recovering level 2
+script --post-level-recover --level 2
+script --post-recover
+</programlisting>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><amkeyword>property</amkeyword> [<amkeyword>append</amkeyword>] [<amkeyword>priority</amkeyword>] <amtype>string</amtype> <amtype>string</amtype>+</term>
+ <listitem>
+<para>No default. You can set property for the script, each script have a different set of property. Both strings are quoted; the first string contains the name of
+the property to set, and the others contains its values.
+<amkeyword>append</amkeyword> keyword append the values to the list of values for that property.
+<amkeyword>priority</amkeyword> keyword disallow the setting of that property on the client.