Subject: Re: Synchronizing Amanda with Applications >I looked at the archives. I found some references to such wrappers, >but I've failed to find a good example of one, and what needs to be done >on which machine (client/server). OK, you asked for it :-). Some notes on the following over-engineered, under-tested, script: * It has **NOT** been run in a full Amanda setup, other than what little I did to make sure syntax was right and the general flow worked. * The script uses **EXAMPLE** execution point functions (see the code). You **WILL** have to change it to do what you want (and remove what you don't). * There are definitions of the Amanda debug directory (e.g. /tmp/amanda) and path to GNU tar (on the client) in the first few lines that may need to be tweaked for your environment. * It is written in ksh (although now that I think about it, I probably could have used Perl). Hopefully the examples and your own shell coding experience will be sufficient to fit in what you need, but if you want some help, ask me offline. The idea is to install this on the client and build Amanda there using --with-gnutar=. Then set up the disks you want to use this wrapper with GNU tar as the dump program in disklist and add execution point functions (see the code) to the script to do what you need. Note that the script doesn't have to actually use GNU tar -- that's just the trick to get Amanda to call it with a set of arguments that are easy to decipher. You can use a run_* function to use whatever dump program you want, as long as it generates an estimate to stdout that Amanda can parse and sends the actual dump image to stdout. Note also that compression is a separate step Amanda will tack on to the stdout of this script (or not). If you want to do your own compression, add it to the script and tell Amanda "compress none". Then test it at least once :-). If you set the DEBUG environment variable to "print" (or "echo" -- same difference), the script will run but not execute anything (although you'll have to set up your own functions to follow the examples in the code). Here is a sample test line I used (using ksh as a login shell): DEBUG=print gtar-wrapper.ksh \ --directory /home/HomeAC \ --file - \ . Amanda will pass whatever you set in disklist as the --directory argument. To test estimates, change "-" to "/dev/null" for the --file argument. Amanda passes a mess of other parameters, but only --directory and --file are of interest to the script. If you do any significant argument processing, make sure you don't loose anything (see function do_home in the script). I think. :-) John R. Jackson, Technical Software Specialist, jrj AT purdue DOT edu ** Additional notes -- 12-Sep-01 ** Fixed some truly silly bugs. Rewrote enough of the code to be able to run under bash as well as ksh.