NAME

dumpnet.diff.conf - the host-specific dumpnet.host.diff configuration file


DESCRIPTION

A dumpnet.diff.conf file is used to configure the module dumpnet.host.diff for a specific target host. It should be placed in a host configuration directory (a subdirectory of $DUMPNET_HOME/conf/) - see the CONFIGURATION section in dumpnet(8) for details. The general format of this configuration file is specified in the section CONFIGURATION FILE FORMAT in dumpnet(8).

Each command is specified on a separate line; fields on each line are separated by spaces or tabs. Lines starting with `#' are comments - for the exeption of the statements ``option'' and ``extends'', see below. The order of records in dumpnet.diff.conf is important because dumpnet.host.diff will perform the execution in the order specified. The configuration file knows the following fields (in this order):

Dirname
The name of the sub-directory where the output is to be stored: $backupDir/$host/$dirname. $dirname can contain slashes. If you have a lot of entries in this configuration file it is recommended to use a subdirectory for all diff files. For example: diffs/nmap.

Cleanup Policy
The cleanup policy to apply for the output files of this command. The master file - the last one without the postfix ``_MODIFIED'' - and the MODIFIED files will be kept implecitely. There fore the cleanup policy only you define here only applies to old master files. Please see the CLEANUP section in dumpnet(8) for details.

Command
The command to execute to retrieve the runtime configuration. If the command is prefixed by an `@' sign the command will be run locally. Commands without the prefix will be run on the target host. If the option runLocally (see below) is set to ``true'' all commands are run locally. A local command can be used to integrate third party software installed on the dumpnet host. For example to do a remote port scan and to get alerted about opened ports you can use a local nmap command.

You can use the variables listed above and all variables used in the script itself. The most useful will be:

$dest
The path to the destination file where the output of the userdefined command will be stored.

$destinationDir
The absolute path to the directory where the destination file is stored.

$sessionId
The ID of the current backup session.

$host
The host name or IP-address of the target host.

$oslogin
The login used to connect via SSH.

You can use the ``option'' and ``extends'' statements in this file - as documented in the CONFIGURATION FILE FORMAT section in dumpnet(8). This allows you to overwrite options set in the host configuration file - see dumpnet.HOST.conf(8). Options you might want to set are:

runLocally
Run all commands - and not just the one's prefixed by an `@' sign - locally on the dumpnet host and not on the target host. This may help you to integrate third party software such as nmap.

dosudo
If set to ``true'' all commands will be run using sudo on the target host. The default is ``false''. The location of the sudo command can be configured using the option sudo in dumpnet.HOST.conf(8). Keep in mind that the login name used to log into the target host can only be defined in dumpnet.HOST.conf.

read_options
Options to be passed to the bash builtin read to read in the configuration file. In some cases you will want to use the -r option which causes the backslash not to act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation. If read_options is not set (or set to an empty string) a backslash-newline pair can be used as a line continuation but all literal backslashes will have to be escaped.

Example:

 # option read_options="-r"


EXAMPLES

A configuration file that alerts changes in the routing table and new open ports:

 # Dirname      CleanupPolicy   Command
 diffs/route    keepLast_4      route -n
 diffs/nmap     keepLast_4      @nmap $host


SEE ALSO

 dumpnet.host(8)
 dumpnet.host.diff(8)
 dumpnet.host.diff.cmd(8)


AUTHOR

 Lukas Feiler <lukas.feiler@lukasfeiler.com>


COPYRIGHT AND LICENSE

dumpnet is published under the LGPL (GNU LESSER GENERAL PUBLIC LICENSE). Please see the LICENSE file contained in the installation tarball for details. The official web site is http://dumpnet.sourceforge.net.