Veritas-bu

[Veritas-bu] Netbackup command to check existence of a specific copy # and retention level

2005-10-07 09:39:18
Subject: [Veritas-bu] Netbackup command to check existence of a specific copy # and retention level
From: mitch.lien AT medtronic DOT com (Lien, Mitch)
Date: Fri, 7 Oct 2005 08:39:18 -0500
Hi Michael.

Thanks for the reply.

I had tried the bpimagelist command, but it does not give you
information concerning specific copies and retention levels.

I agree this should be the command to use, but I have run into a couple
of problems when I attempt to use the bpimagelist command.

1) If I run the bpimagelist command with a "-L" and "-rl <#>"  argument,
only the primary copy retention level is used for the query. The command
will not pick up the "copies" that match the "bpimagelist -client
LAXM1BAPPS63 -policy NT-Server -d 10/01/2005 -e 10/07/2005.

If the "-rl <#>" is omitted, the copy information comes in, but it is in
a format which would be difficult to pull out the needed values.



2) If I run the bpimagelist command with a "-l", I get:

# bpimagelist -client LAXM1BAPPS63 -policy NT-Server -d 10/01/2005 -e
10/07/2005 -l

IMAGE LAXM1BAPPS63 0 0 7 LAXM1BAPPS63_1128405974 NT-Server 13 *NULL*
root Daily-Incremental-NTServer 1 3 1128405974 160 11296155
74 0 0 300040 1954 2 6 0 NT-Server_1128405974_INCR.f *NULL* *NULL* 0 1 0
0 0 NT-Server 1 0 0 0 0 0 0 *NULL* 0 0 0 *NULL* 111501
0 0 202287 0 0
HISTO -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
FRAG 1 1 285184 0 2 6 73 M02475 laxstg2 262144 854730 1127055271 13 0
*NULL* 1131084374 1 65539 0 0 0 0 0 0 0
FRAG 1 2 512 0 2 6 74 M02475 laxstg2 262144 859254 1127055271 13 0
*NULL* 0 0 0 0 0 0 0 0 0 0
FRAG 1 3 14344 512 2 6 75 M02475 laxstg2 262144 859264 1127055271 13 0
*NULL* 0 0 0 0 0 0 0 0 0 0
FRAG 2 1 285184 0 2 6 64 M03195 laxstg2 262144 408430 1128438229 0 0
*NULL* 1129615574 1 65537 0 0 0 0 0 0 0
FRAG 2 2 512 0 2 6 65 M03195 laxstg2 262144 412954 1128438229 0 0 *NULL*
0 0 0 0 0 0 0 0 0 0
FRAG 2 3 14344 512 2 6 66 M03195 laxstg2 262144 412963 1128438229 0 0
*NULL* 0 0 0 0 0 0 0 0 0 0


I can "grep" the "FRAG 2" to get the second copy information, but the
Retention Level field is not shown here. I could try to calculate using
the ctime vaule (1128438229) but again that would be somewhat difficult
to calculate the retention level value. From what I can tell the
"*NULL*" value is where the retention level number should be, but
apparently Veritas (Symantec) doesn't want to show the value.


I think my best bet may be to use the "bpimmedia" command (shown below):

# bpimmedia -client LAXM1BAPPS63 -policy NT-Server -d 10/01/2005 -e
10/07/2005

IMAGE LAXM1BAPPS63 7 LAXM1BAPPS63_1128215461 NT-Server 13
Weekly-Full-NTServer 0 3 32333 1130893861 0 0
FRAG 1 1 1080576 0 2 6 15 M02615 laxstg1 262144 185261 1128214984 7 0
*NULL* 0 0 3
FRAG 1 2 1113856 0 2 6 16 M02615 laxstg1 262144 200891 1128214984 7 0
*NULL* 0 0 3
FRAG 1 3 1115392 0 2 6 17 M02615 laxstg1 262144 216521 1128214984 7 0
*NULL* 0 0 3
FRAG 1 4 53022 0 2 6 18 M02615 laxstg1 262144 232151 1128214984 7 0
*NULL* 0 0 3
FRAG 2 1 1140480 0 2 6 34 M04110 laxstg2 262144 405593 1128325263 2 0
*NULL* 1133572261 1 4
FRAG 2 2 1212416 0 2 6 35 M04110 laxstg2 262144 421223 1128325263 2 0
*NULL* 0 0 4
FRAG 2 3 1231872 0 2 6 36 M04110 laxstg2 262144 436853 1128325263 2 0
*NULL* 0 0 4
FRAG 2 4 1548288 0 2 6 37 M04110 laxstg2 262144 452483 1128325263 2 0
*NULL* 0 0 4

I think I can grep out "FRAG 2" and then awk out the last value on the
line (which is the retention level 4). In this case, I should be able to
confirm that a 2nd copy with a retention level of 4 exists.

I would think there would be an easier way, but haven't been able to
find one. If anyone has a method, I would really appreciate the help.

Thanks again.

Mitch



-----Original Message-----
From: ida3248b AT post.cybercity DOT dk [mailto:ida3248b AT post.cybercity DOT 
dk] 
Sent: Thursday, October 06, 2005 11:56 PM
To: Lien, Mitch; veritas-bu AT mailman.eng.auburn DOT edu
Cc: veritas-bu-admin AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Netbackup command to check existence of a
specific copy # and retention level

Hello Mitch

Have you tried to use bpimagelist ?

Regards
Michael

On Thu, 6 Oct 2005 15:13:09 -0500, Lien, Mitch wrote
> Hi.
> 
> I am writing a shell script that will be used to validate Vault 
> duplication jobs.
> 
> Specifically, we want to know that all of our clients/policies have 
> duplicated correctly and have the correct retention level.
> 
> Within the script, I have a line which is similar to the following:
> 
> bpimmedia -client $CLIENT -policy $POLICY -d $START_DATE -e $END_DATE 
> -cn $COPY_NUMBER -rl $RETENTION_NUMBER
> 
> Example:
> # bpimmedia -client sapdbpr1 -policy sapdbpr1_PRD_Daily_L700 -d
> 10/01/2005 -e 10/05/2005 -cn 2 -rl 3
> IMAGE sapdbpr1 7 sapdbpr1_1128513878 sapdbpr1_PRD_Daily_L700 0 
> Daily-Full-sapdbpr1L700 0 3 179 1129723478 0 0 FRAG 1 1 29920 0 2 6 
> 641 M02545 laxstg1.corp.minimed.com 262144 1189199 1114689840 5 0 
> *NULL* 1131192278 0 3 FRAG 2 1 29920 0 2 6 8 M02746 laxstg2 262144 
> 38664 1128524650 0 0 *NULL*
> 1129723478 0 1
> 
> When the above command is run, the output always shows both copy 1 and

> copy 2 information. If there isn't a copy 2, it shows the copy 1 info.

> I would like the output to show "no entity found" if there isn't a 
> copy 2. From what I can see, the "-cn" is getting ignored. I have 
> tried using the "-spangroups" argument, but that does not appear to 
> work and I am not sure what it is doing.
> 
> I have had some luck with the "bpduplicate -PM -cn <copy number> 
> -policy <policy name> -client <client name> -s <start date> -e <end
date>"
> command. It is telling me if a specific copy does exist or not; 
> however, it is not accepting the retention level "-rl" argument.
> When I attempt to use "-rl" it appears to be ignored.
> 
> If anyone has a way to query the image db by copy # and retention 
> level and get a true/false type output, I would appreciate your help.
> 
> Thanks.
> 
> Mitch
> 
> _______________________________________________
> Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu 
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


--
Cybercity Webhosting (http://www.cybercity.dk)