dumpnet.host.userdefined - run userdefined commands on the target host (or locally) and save their output
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.
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
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.
$DUMPNET_HOME/conf/_defaults/dumpnet.userdefined.conf $DUMPNET_HOME/conf/$host/dumpnet.userdefined.conf
dumpnet(8) dumpnet.host(8) dumpnet.host.userdefined.cmd(8) dumpnet.userdefined.conf(8)
Lukas Feiler <lukas.feiler@lukasfeiler.com>
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.