Networker

Re: [Networker] backup command...anyone using?

2003-10-06 04:19:51
Subject: Re: [Networker] backup command...anyone using?
From: Davina Treiber <Treiber AT HOTPOP DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Mon, 6 Oct 2003 07:58:12 +0100
Byron Servies wrote:
On October 03, 2003 at 13:35, David Gold-news wrote:

I'm looking to use a custom command for my backup command field (not save,
savepnpc or one of the Legato modules), and am having problems determining
what savegrp uses to determine if a save is successful or not. I've tried
both an exit code of 0 and 1, and both appear to be seen as Unsuccessful
saves.

Has anyone done something like this, and if so, can you let me know what
you've done to get the successful status?


Hi,

You know that you cannot just put any old command there, right?  It
must emit the NetWorker save stream format, which means you can use
save, a nsrfile based ASM, or one of the NetWorker modules.  Nothing else
will work, regardless of exit code.

No Byron that's wrong. You can put anything in the backup command, and
it doesn't have to save any data.

The answer to the original question is that is doesn't use the return
code to determine success or failure. The key is to output a message on
stdout in the same format that save would use to indicate success. A
typical save command might output a message like so:

save: /etc/hosts  7 KB 00:00:03      3 files

It's just the format that's important, so I sometimes use the following
command to indicate success in a shell script:

echo 'save: no_data  0KB 00:00:00     0 files   completed savetime=0'

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

<Prev in Thread] Current Thread [Next in Thread>