Networker

Re: [Networker] Using the BACKUP COMMAND CUSTOMIZATION functionality of the client resource.

2003-09-11 10:30:52
Subject: Re: [Networker] Using the BACKUP COMMAND CUSTOMIZATION functionality of the client resource.
From: Davina Treiber <treiber AT HOTPOP DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Thu, 11 Sep 2003 10:30:46 -0400
On Thu, 11 Sep 2003 08:48:48 -0500, Jim.Martin <Jim.Martin AT TARGET DOT COM>
wrote:

>I have the need to execute a custom backup script on the client to
>generate the backup list as am backing up a cluster (Veritas Cluster
>Server ,VCS) that networker is not aware of.   Networker will look only
>at /etc/vfstab when ALL is places in the saveset list of the client
>resource.   As shared file systems are not managed there - I need to
>hard code a list of files to be backed up for a virtual client name.
>This is limited to non-ORACLE RMAN files.    I am not happy about hard
>code as will be out of date as soon as I am done.   I find reference to
>'backup command customization' in  CHAPTER 4 of the Networker admin
>guide.   There it implies that I can specify an alternative backup
>command, which can be a script placed in /bin, where save is located.  I
>also need to have a save command in the script.    It then appears to me
>that I can then include in the script logic that will discover what file
>systems are present that need to be included, followed by successive
>save commands containing these file systems.   I can get it to find my
>script, but it then tries to use the backup command specified against
>the contents of the saveset list field.   The only reason I am scripting
>this solution is to bypass the saveset list field for the reasons
>mentioned above.      Is there some undocumented solution that I am not
>seeing.   I believe that Legato's response is that a PS engagement is
>required to get this going.    Any body been down this path?  I have
>think yes as VCS is fairly ubiquitous.

There are a couple of ways to approach this.

(1) Have a job that runs daily to update the client resource with the
current list of filesystems. You imply from your post that you have a
script to do this or are comfortable with writing one. When you have the
list, it is fairly simple to update the client resource using nsradmin in
your script. Run this script a few minutes before your backup starts from a
cron job. You can't do it as part of the backup because by the time you get
to the point where things are executing on the client, the server has
already probed for the list of filesystems, and it's too late to change it.

(2) Use a backup command (not savepnpc) to simply run your custom backup.
This will be a script that lives in the same place as the save command and
must be named so that it starts save... or nsr... Within this script, you
can basically do what you want, multiple saves etc. Bear in mind though
that this will be single threaded unless you write complex code to multi-
thread it. This script will run as many times as the save sets you specify
in the client resource, so you probably only want to specify one save set.
The save set doesn't have to be anything specific, it can even be something
informative such as "cluster filesystems" as an aide memoire for when you
look at the client resource, and it may also be useful to note that this is
passed into your script and you may find it useful. This is of course the
way that NetWorker modules (RMAN, Exchange etc.) work. The reference to a
save command in the script is not strictly true. Normally you would do
this, but really all we are worried about is having the correct output from
the script to satisfy NetWorker that the save command has completed
successfully. To do this all that you need to do is echo a string to stdout
at the end of the script, looking something like: "save: no_data 0KB
00:00:00 0 files completed savetime=0"

Personally I would favour option 1, but either will work.

--
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.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=