On Sat, Feb 09, 2002 at 12:22:59AM +0100, Peter L. Buschman wrote:
>
> Kevin:
>
> Check out the "bpimmedia -L" command. This should show you the media ID
> and copy number along with
> the backup ID that matches what you are seeing from bpimagelist.
I looked at the output of the "bpimmedia -L" command but it is not
obvious how to tell which duplicates were created now.
I chose a bit different approach. After duplicating the tapes with
bpduplicate command I run bpmedialist command and filter it's
output to get media ids written today. Here are the relevant parts
of my script:
# duplacate FULLs created during last HOURSAGO
$BPDUPLICATE -dstunit $DSTUNIT -v -st FULL -hoursago $HOURSAGO -dp $POOL -L
$BPDUPLOG
#/usr/openv/netbackup/bin/admincmd/bpduplicate -dstunit vagus-dlt2-robot-tld-1
-v -st FULL -hoursago
168 -dp dup -L bpdup.log
#
# find what tapes had been written
MEDIA=$($BPMEDIALIST -mlist -l -p $POOL | $WRMEDIALIST)
#/usr/openv/netbackup/bin/admincmd/bpmedialist -mlist -l -p dup
WRMEDIALIST is a short perl script:
#!/usr/local/bin/perl
#
# filter output of bpmedialist -l command and return media ids written today
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$dst) = localtime(time);
$result = "";
while (<>) {
@media = split ,$_;
$media_id = $media[0];
$last_written = $media[5];
($m_sec,$m_min,$m_hour,$m_mday,$m_mon,$m_year,$m_wday,$m_yday,$m_dst) =
localtime($last_writ
ten);
$result .= $media_id." " if $m_yday == $yday;
}
print $result;
HTH, -Kastus
>
> Best regards,
>
> --PLB
>
>
> At 02:16 PM 02/08/2002 -0500, Kevin Zhang wrote:
> >Hello all,
> >
> >Now I am writing a vaulting script which will make duplicate copy and send
> >the second copy offsite, but I have a problem that after the duplicate
> >process, how can I finger out the second copy 's media ID? I tried
> >"bpimagelist -U -media -client client_name -hoursago hours", but It shows
> >two copies were created at the same time. Please help me with this.
> >
> >Thanks
> >
> >
> >Kevin Zhang
> >kzhang AT rci.rogers DOT com
> >905-5135038
> >
> >_______________________________________________
> >Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
> >http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>
> _______________________________________________
> Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
--
Konstantin 'Kastus' Shchuka
Unix System Administrator
ePocrates Inc.
tel 650.232.4886
fax 650.592.6995
|