Veritas-bu

[Veritas-bu] Generating list of all active clients !!

2006-07-20 11:16:08
Subject: [Veritas-bu] Generating list of all active clients !!
From: ewilts at ewilts.org (Ed Wilts)
Date: Thu, 20 Jul 2006 10:16:08 -0500
On Thu, Jul 20, 2006 at 03:50:22PM +0100, Courteney, Jonathan wrote:
> I am about to start a migration to new tape silo's and as part of this I
> would like to tidy up the clients and policies as I migrate. I want to
> generate a list from Netbackup of all active clients and the policies
> they are currently in? I have played about with bpdbjobs , bpclclients
> but cannot seem to achieve this.
> 
> Any help would be gratefully received.
> 
> Currently I have 98 policies with about 1700 clients.

bppllist is your friend here.  It lists the policies.  Given each
policy, you can list all of the clients and schedules in it.  I've got a
couple of quick scripts to report on all schedules that I will include
below.  Given the policy, it will quickly generate the clients and
schedules in each one.   Naturally, it's unsupported, undocumented, and
you use it at your own risk.  I'd appreaciate it if you find a bug that
you let me know though so that I can fix it.

Watch for email wrapping...

[root at osiris ~]# cat schedule-list
#!/bin/sh
bppllist -allpolicies | awk -f schedule-list.awk

[root at osiris ~]# cat schedule-list.awk
/^CLASS/ {
        print $2
}

/^INFO/ {
        if ($12 == 1 ) print "  *** Policy is INACTIVE ***"
}

/^CLIENT/ {
        print " ",$1, $2
}

/^SCHED / {
        type = "Unknown"
        if ($3 == 0 ) type = "Full"
        if ($3 == 1 ) type = "Differential Incremental"
        if ($3 == 2 ) next # "User Backup"
        if ($3 == 3 ) next # "User Archive"
        if ($3 == 4 ) type = "Cumulative Incremental"
        frequency = $5/86400
        retention = "infinite"
        if ($6 == 0 ) retention = "1 week"
        if ($6 == 1 ) retention = "2 weeks"
        if ($6 == 2 ) retention = "3 weeks"
        if ($6 == 3 ) retention = "1 month"
        if ($6 == 4 ) retention = "2 months"
        if ($6 == 5 ) retention = "3 months"
        if ($6 == 6 ) retention = "6 months"
        if ($6 == 7 ) retention = "9 months"
        if ($6 == 8 ) retention = "1 year"
        if ($6 == 10 ) retention = "2 years"
        if ($6 == 11 ) retention = "3 years"
        if ($6 == 12 ) retention = "5 years"
        if ($6 == 13 ) retention = "7 years"
        if ($6 == 14 ) retention = "10 years"
        print " ",$2 ":", type ,"every",frequency, "days;",retention,"retention"
}

/^INCLUDE/  {
        if ($2 !~ /NEW_STREAM/ ) print " ",$2, $3, $4, $5, $6, $7
}


        .../Ed
-- 
Ed Wilts, Mounds View, MN, USA
mailto:ewilts at ewilts.org

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