cancel
Showing results for 
Search instead for 
Did you mean: 

Looking up policy name from client side ...

Nathan_Kippen
Level 6
Certified
I am building a script that I want to put on every one of my unix servers that will do an archive backup.  I want to make this script generic so that I can run it on all my unix clients.  I have (kinda) figured out a way to lookup which policy a client belongs to but I'm wondering if anybody has any better ideas / solutions.
 
This is what I've come up with ...
 
 
Code:
......bparchive -p `bpclimagelist -U | awk 'NR==3 {print $9}'` -s audit_arch_1yr -L ${LOG} -S ${MASTER} -t 0 -w ${SOMEFILES}....

 
Some other problems/thoughts ...
 
-I have some clients belonging to multiple policies (only 1 policy has the needed schedule)
-I'm worried that in future releases bpclimagelist might become deprecated or removed
 
I guess what I'm asking is does anybody have any thoughts or comments on different ways to accomplish what I'm trying to do?  I suppose I could add the audit_arch_1yr schedule to every policy and not worry about it but I'm looking for other solutions.  Also my naming schemes for policy names vary ... not every policy name is for example named after a specific client.
 
-NK
 
1 REPLY 1

Stumpr2
Level 6
To generate a list of clients
bpplclients -allunique -noheadedr | awk '{print $2}'
 
To generate a list of policies that the client is in
bppllist -l -byclient <clientname> | grep CLASS | awk '{print $2}'
 
 


Message Edited by Stumpr on 01-10-2008 09:01 PM