Veritas-bu

[Veritas-bu] bpduplicate media ID

2002-02-10 22:23:31
Subject: [Veritas-bu] bpduplicate media ID
From: plb AT iotk DOT com (Peter L. Buschman)
Date: Mon, 11 Feb 2002 04:23:31 +0100
Shchuka:

Unless I am mistaken, the copy number should be an indicator of which 
duplicates are
the most recent.  Since NetBackup 3.x only allows 2 copies, copy 1 should 
be the original,
and copy 2 the duplicate.

--PLB

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
>_______________________________________________
>Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


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