NAME

dumpnet.host.userdefined - run userdefined commands on the target host (or locally) and save their output


SYNOPSIS

BACKUP MODE
dumpnet.host.userdefined [-N] [-l LEVEL] [-s SESSIONID] [-d DUMPNET_CONFIG] [-C USERDEFINED_CONFIG] HOST_CONFIG

RESOTRE MODE
dumpnet.host.userdefined -R [-v] [-f FILE] [-d DUMPNET_CONFIG] [-C USERDEFINED_CONFIG] HOST_CONFIG


DESCRIPTION

dumpnet.host.userdefined runs the commands specified in the configuration file dumpnet.userdefined.conf placed in a host configuration directory. For each command it will call dumpnet.host.userdefined.cmd to do most of the job. dumpnet.host.userdefined gives you the ability to implement incremental backup with whatever commands you need. Just use one of the special variables in your command and it does the rest. The commands can be run on the target host (default) or locally on the dumpnet host. Please see dumpnet.userdefined.conf(8) for details.


OPTIONS

BACKUP MODE
-N
Do not update dumpnet.cmddates. This is useful for an irregular backup. Keep in mind that a backup created with the -N switch will not be listed in restore mode. See dumpnet.cmddates(8).

-l LEVEL
Set level to LEVEL. This can be a numerical level (0-9) or a level mode. See the sections LEVELS and LEVEL MODES in dumpnet(8) for details.

-s SESSIONID
Set sessionId to SESSIONID. If you don't know if you need this option, you don't! Read the SESSIONID section in dumpnet(8) before using it!

-d DUMPNET_CONFIG
Use DUMPNET_CONFIG instead of the default $DUMPNET_HOME/conf/dumpnet.conf.

-C USERDEFINED_CONFIG
Use USERDEFINED_CONFIG as the configuration file (the default is ``dumpnet.userdefined.conf''). USERDEFINED_CONFIG can be the path to the configuration file or `-' to read the fstab configuration from STDIN.

HOST_CONFIG
The host configuration file. For the target host 192.168.1.10 it could be conf/192.168.1.10/dumpnet.HOST.conf.

RESTORE MODE
-R
Restore mode. This will not actually do the restore but will list the files you will need to perform it manually.

-v
Be verbose.

-f FILE
Find the files that are needed to restore FILE. FILE will be used as a pattern to grep in the TOC-files. Please note that entries in the tar TOC-files do not contain a leading slash.

-d DUMPNET_CONFIG
Use DUMPNET_CONFIG instead of the default $DUMPNET_HOME/conf/dumpnet.conf.

-C USERDEFINED_CONFIG
Use USERDEFINED_CONFIG as the configuration file (the default is ``dumpnet.userdefined.conf''). USERDEFINED_CONFIG can be the path to the configuration file or `-' to read the fstab configuration from STDIN.

HOST_CONFIG
The host configuration file. For the target host 192.168.1.10 it could be conf/192.168.1.10/dumpnet.HOST.conf.


EXAMPLES

Run the userdefined commands for 192.168.1.10 configured in /usr/local/dumpnet/conf/192.168.1.10/dumpnet.HOST.conf with the default config file dumpnet.userdefined.conf - if you don't know what you want, you want something like this:

        dumpnet.host.userdefined /usr/local/dumpnet/conf/192.168.1.10/dumpnet.HOST.conf

Run the commands for 192.168.1.11 configured in conf/192.168.1.11/dumpnet.HOST.conf with a config of conf/192.168.1.11/dumpnet.userdefined2.conf

        dumpnet.host.userdefined -C conf/192.168.1.11/dumpnet.userdefined2.conf conf/192.168.1.11/dumpnet.HOST.conf

Run only the mysqldump command, that is configured in conf/192.168.1.11/dumpnet.userdefined.conf. Keep in mind that this way, none of the ``option'' and ``extends'' statements in dumpnet.userdefined.conf will make it to the STDIN of dumpnet.host.userdefined.

        grep mysqldump conf/192.168.1.11/dumpnet.userdefined.conf | dumpnet.host.userdefined -C - conf/192.168.1.11/dumpnet.HOST.conf

Force the use of level 0 and do not update dumpnet.cmddates:

        dumpnet.host.userdefined -Nl 0 /usr/local/dumpnet/conf/example.com/dumpnet.HOST.conf

List the files I need to restore all backups of 192.168.1.10 created with userdefined commands:

        dumpnet.host.userdefined -R /usr/local/dumpnet/conf/192.168.1.10/dumpnet.HOST.conf

Find the backups, that have a TOC file that contains the string home/jdoe/somefile.txt. TOC files are named like the backup file just with ``.toc'' appended.

        dumpnet.host.userdefined -Rf home/jdoe/somefile.txt /usr/local/dumpnet/conf/192.168.1.10/dumpnet.HOST.conf


EXIT STATUS

dumpnet.host.userdefined will return a zero exit status if all calls to dumpnet.host.userdefined.cmd exit with 0. In any other case it will return 1.


FILES

 $DUMPNET_HOME/conf/_defaults/dumpnet.userdefined.conf
 $DUMPNET_HOME/conf/$host/dumpnet.userdefined.conf


SEE ALSO

 dumpnet(8)
 dumpnet.host(8)
 dumpnet.host.userdefined.cmd(8)
 dumpnet.userdefined.conf(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.