[Veritas-bu] Pre-/Post-Exec scripts with NetBackup 5.1?
2007-01-09 08:53:09
Subject: |
[Veritas-bu] Pre-/Post-Exec scripts with NetBackup 5.1? |
From: |
Patrick.Whelan at colt.net (Whelan, Patrick) |
Date: |
Tue, 9 Jan 2007 13:53:09 -0000 |
You could:
bpdbjobs -most_columns | grep backupid | awk -F, '{ print $17 }'
Caveat emptor.
Regards,
Patrick Whelan
NetBackup Specialist
Architect & Engineering
+44 20 7863 5243
Of all the things I've lost, I miss my mind the most! - Unknown
There are only 10 kinds of people on earth - those who understand binary
and those who don't.
... Als sie mich holten,
gab es keinen mehr, der protestieren konnte
-- Martin Niem?ller
-----Original Message-----
From: veritas-bu-bounces at mailman.eng.auburn.edu [mailto:veritas-bu-bounces
at mailman.eng.auburn.edu] On Behalf Of Alexander Skwar
Sent: 09 January 2007 13:16
To: veritas-bu at mailman.eng.auburn.edu
Subject: Re: [Veritas-bu] Pre-/Post-Exec scripts with NetBackup 5.1?
Hello again :)
Ed Wilts wrote:
> On 1/9/2007 6:22 AM, Alexander Skwar wrote:
>> Hi!
>>
>> Whelan, Patrick wrote:
>>> Look at bpstart_notify and bpend_notify examples in
>>> /usr/openv/netbackup/bin/goodies.
>> Thanks a lot. This seems to be very much what I'm looking for.
>>
>> Some questions, though. How do I "install" this script? Do I
>> need to copy it to some special directory?
>
> Copy it it to /usr/openv/netbackup/bin
That's it - also thanks to Patrick reg. his hint on how to name that
file.
> It will get called for every stream.
Hm, okay. I now have a VERY basic script, which does:
echo pwd: `pwd` >> $OUTF
echo Params: "$@" >> $OUTF
echo >> $OUTF
env | sort >> $OUTF
In OUTF, I find:
================================================================================
Tue Jan 9 14:14:10 CET 2007 full backup started on winds06 - policy TEST
schedule TestSched
pwd: /root
Params: winds06 TEST TestSched FULL
BACKUPID=winds06_1168348386
BACKUPTIME=Tue Jan 9 14:13:06 2007
BPEND_TIMEOUT=300
BPSTART_TIMEOUT=300
IS_NETBACKUP_DAEMON=YES
KEYWORD=NONE
LC_COLLATE=en_US.ISO8859-1
LC_CTYPE=en_US.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
PATH=/usr/sbin:/usr/bin
RESTARTED=0
SMF_FMRI=svc:/network/bpcd/tcp:default
SMF_METHOD=inetd_start
SMF_RESTARTER=svc:/network/inetd:default
STREAM_COUNT=2
STREAM_NUMBER=1
STREAM_PID=18379
STREAMS=0
TZ=Europe/Zurich
UNIXBACKUPTIME=1168348386
Can I somehow find out, which directory is currently being
backed up?
I see that there are environment variables called STREAM_*.
Are those somehow useful for me?
Using the STREAM_PID, I find:
askwar at winds06 ~ $ ps -ef | grep 18379
askwar 18394 18337 0 14:14:37 pts/13 0:00 grep 18379
root 18379 1 0 14:14:11 ? 0:00 bpbkar -r 1209600 -ru root
-dt 0 -to 7200 -clnt winds06 -class TEST -sched Test
Hm.
Cheers,
Alexander Skwar
_______________________________________________
Veritas-bu maillist - Veritas-bu at mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
*************************************************************************************
The message is intended for the named addressee only and may not be disclosed
to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also
be subject to legal privilege. If you are not the named addressee and/or have
received this message in error, please advise us by e-mailing security at
colt.net and delete the message and any attachments without retaining any
copies.
Internet communications are not secure and COLT does not accept responsibility
for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its
subsidiaries or affiliates ("COLT") and any other party by email Communications
unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate
potential viruses and unsolicited promotional emails. For more information
refer to www.colt.net or contact us on +44(0)20 7390 3900.
|
|
|