Amgetconf: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
==Name==
==Name==


amgetconf — look up amanda.conf variables
'''amgetconf''' — look up amanda.conf variables


==Synopsis==
==Synopsis==


amgetconf [config] parameter
'''amgetconf''' [config] parameter


==DESCRIPTION==
==DESCRIPTION==


Amgetconf looks up parameters in amanda.conf, the AMANDA configuration file, or from the build and runtime environment, and returns their corresponding value.
Amgetconf looks up parameters in amanda.conf, the Amanda configuration file, or from the build and runtime environment, and returns their corresponding value.


If config is not specified, amgetconf assumes it is being run from the configuration directory and that amanda.conf is present.
If config is not specified, amgetconf assumes it is being run from the configuration directory and that amanda.conf is present.
Line 15: Line 15:
If parameter begins with build., the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g. XFSDUMP on a system that does not support that type of file system) will not report an error and will return an empty string as the value. Flag variables (e.g. USE_AMANDAHOSTS) will return 1 if the flag is set or an empty string if it is not.
If parameter begins with build., the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g. XFSDUMP on a system that does not support that type of file system) will not report an error and will return an empty string as the value. Flag variables (e.g. USE_AMANDAHOSTS) will return 1 if the flag is set or an empty string if it is not.


If parameter begins with dbopen., the string following the period is a program name and an AMANDA debug file will be created for the caller. The name of the file is returned.
If parameter begins with dbopen., the string following the period is a program name and an Amanda debug file will be created for the caller. The name of the file is returned.


If parameter begins with dbclose., the string following the period is a program name previously used with dbopen., followed by a colon (:) and the previously opened file name.
If parameter begins with dbclose., the string following the period is a program name previously used with dbopen., followed by a colon (:) and the previously opened file name.


See the amanda(8) man page for more details about AMANDA.
See the [[amanda]](8) man page for more details about AMANDA.


==EXAMPLE==
==EXAMPLE==
Line 25: Line 25:
Find out the path to the log file directory:
Find out the path to the log file directory:


 
% amgetconf daily logdir
% amgetconf daily logdir
/usr/local/etc/amanda//daily
/usr/local/etc/amanda//daily


Find out the current tape type:
Find out the current tape type:


 
% amgetconf daily tapetype
% amgetconf daily tapetype
DLT4000-IV
DLT4000-IV


Find out the default configuration directory:
Find out the default configuration directory:


 
% amgetconf daily build.CONFIG_DIR
% amgetconf daily build.CONFIG_DIR
/usr/local/etc/amanda/
/usr/local/etc/amanda/


Create, use and close a debug file in a script:
Create, use and close a debug file in a script:


 
% set debug_file = `amgetconf daily dbopen.myscript`
% set debug_file = `amgetconf daily dbopen.myscript`
% echo debug information >> $debug_file
% echo debug information >> $debug_file
% amgetconf daily dbclose.myscript:$debug_file
% amgetconf daily dbclose.myscript:$debug_file


==MESSAGES==
==MESSAGES==


amgetconf: no such parameter param
; <nowiki>amgetconf: no such parameter param</nowiki> : Parameter param is not a known keyword (e.g. not a valid amanda.conf keyword). In this case, amgetconf will write "BUGGY" to stdout as the value.
 
Parameter param is not a known keyword (e.g. not a valid amanda.conf keyword). In this case, amgetconf will write "BUGGY" to stdout as the value.


==SEE ALSO==
==SEE ALSO==


amanda(8)
[[amanda]](8)

Revision as of 23:30, 1 December 2005

Name

amgetconf — look up amanda.conf variables

Synopsis

amgetconf [config] parameter

DESCRIPTION

Amgetconf looks up parameters in amanda.conf, the Amanda configuration file, or from the build and runtime environment, and returns their corresponding value.

If config is not specified, amgetconf assumes it is being run from the configuration directory and that amanda.conf is present.

If parameter begins with build., the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g. XFSDUMP on a system that does not support that type of file system) will not report an error and will return an empty string as the value. Flag variables (e.g. USE_AMANDAHOSTS) will return 1 if the flag is set or an empty string if it is not.

If parameter begins with dbopen., the string following the period is a program name and an Amanda debug file will be created for the caller. The name of the file is returned.

If parameter begins with dbclose., the string following the period is a program name previously used with dbopen., followed by a colon (:) and the previously opened file name.

See the amanda(8) man page for more details about AMANDA.

EXAMPLE

Find out the path to the log file directory:

% amgetconf daily logdir
/usr/local/etc/amanda//daily

Find out the current tape type:

% amgetconf daily tapetype
DLT4000-IV

Find out the default configuration directory:

% amgetconf daily build.CONFIG_DIR
/usr/local/etc/amanda/

Create, use and close a debug file in a script:

% set debug_file = `amgetconf daily dbopen.myscript`
% echo debug information >> $debug_file
% amgetconf daily dbclose.myscript:$debug_file

MESSAGES

amgetconf: no such parameter param
Parameter param is not a known keyword (e.g. not a valid amanda.conf keyword). In this case, amgetconf will write "BUGGY" to stdout as the value.

SEE ALSO

amanda(8)