Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bperror script assistance policy count to backup count 1

Status
Not open for further replies.

CalgaryCR9

Technical User
Aug 12, 2005
80
0
0
CA
In my backup script I have the line:
/opt/openv/netbackup/bin/admincmd/bperror -L -U -backstat -by_statcode -hoursago 20

This line generates output similar to:
0 the requested operation was successfully completed
server1 server2 server3 server4 server5
84 media write error
server6 server7

How can I compare the list of servers reporting in the above command to a list of active policies? I'm trying to have a one or two line output that says:
server6 server 7 server8 server9 did not backup

The line I'm currently using does not necessarily get active policies that didn't attempt to backup.

Alternatively I'd like a word count of the number of active policies vs the number of successful backups.

NB 6.0MP4 on Solaris 9
 
I'm trying to have a one or two line output that says:
server6 server 7 server8 server9 did not backup"

How about something like this;

bperror -backstat -U | awk '($1 > 0) {print $0}'
 
Or even;

bperror -backstat -U | awk '($1 > 0) {print $0}' | sed -e '1d' | awk '{++a[$3]}END{for (i in a)print i,a}'

To list the policies and the count of all failures.

Work is slow today obviously...
 
Cool, but not entirely what I was looking for. I was thinking of how to ask more clearly last night and whola!

Is there a command that lists the active policies set up on a backup server with the output being the hostname of the client being backed up?

I want a visual comparison via email of what we should be backing up vs what was backed up.
 
bppllist lists policies within the NetBackup database. I'll do a comparison of the bperror to bppllist for the desired info! Just weeded through NB docs for the command.

Thanks for your help.
 
Have a look at the NBU command bpschedreq.
This will give you an output of expected backups for a given date to compare against.
 
That may be a bum steer. Looks like the bpschedreq command was removed for NBU6.

Very helpful of Veritas.
 
It was replaced with:

DOCUMENTATION: What is the "nbpemreq" command used for in Veritas NetBackup (tm) 6.0?

Details:
Manual: NetBackup (tm) 6.0 Commands for UNIX, Page(s): 391
Modification Type: Supplement

Modification:
The Veritas NetBackup (tm) 6.0 Commands for UNIX manual mentions the nbpemreq command, but doesn't explain what the command can be used for.

There are three options available for the nbpemreq command:
usage: nbpemreq -updatepolicies
usage: nbpemreq -predict -date <mm/dd/yyyy HH:MM:SS>
usage: nbpemreq -predict -dateu <unixtime>

The "nbpemreq -updatepolicies" will cause the NetBackup Policy Execution Manager (nbpem) to reread the existing policy configuration. The nbpem daemon will check for changes based on the Global attribute Policy Update Interval. By default, this is set to ten minutes. The
-updatepolicies option can be issued after making a change to a policy to allow the changes to take effect immediately. TechNote 278492, found below in the Related Documents, contains additional information for the -updatepolicies option.

# cd /usr/openv/netbackup/bin/admincmd
# ./nbpemreq -updatepolicies
The command will simply return the prompt after being run.

The "nbpemreq -predict" option replaces the functionality that used to be available from the "bpschedreq -predict" command. The "-date <date>" or the "-dateu <unixtime>" option must also be specified. The -predict option will display backup policies that are due to run on a specific day and time. This command will not display when a specific policy will run, rather it will display policies that are eligible to run and that have open backup windows during the time specified. Factors such as drive availability, max jobs per client, exclude dates, etc., will impact when a job can actually run.

# cd /usr/openv/netbackup/bin/admincmd
# ./nbpemreq -predict -date 9/15/2005 16:00:00
Predicted worklist for Thu Sep 15 16:00:00 2005
rl client policy schedule type
-- ---------- ---------- ---------- -----
01 starfury test-dlt2 FULL 0
This will display the Retention level (rl), Client Name (client), Policy name (policy), Schedule Name (schedule) and Policy type (type). The rl and type values will display the numeric equivalent of the retention level and policy type.

The following caveats exist for the nbpemreq -predict command:

Running the -predict option without specifying a time will use a default time of 23:59:59 hours.
Running the -predict option and specifying a time in the past will display the nbpemreq usage.
Running the -predict option will only show backups that are eligible to run. It is not an indication of what jobs will run at a specific time.
The -predict option only checks if there is an open window for the backup and does not reflect any exclude dates that might be set for the schedule.

The following undocumented options exist for the nbpemreq command:

# nbpemreq -terminate
This will stop the nbpem daemon and the associated nbpem_email and nbproxy processes.

# nbpemreq -suspend_scheduling
This will stop the nbpem daemon from scheduling backups. Manual backups can still be initiated.

# nbpemreq -resume_scheduling
This will allow the nbpem daemon to resume normal scheduling of backups.

# nbpemreq -tables screen
This will dump the worklist to the screen. This will include each policy and schedule and the specific time it is next due to run.



Bob Stump
VERITAS - "Ain't it the truth?"
 
Thanks Bob,

Very helpful information. Do you know of any 'rosetta stone' for updated / changed commands from nbu5 to nbu6?

Cheers
 
errrr...The Release Notes possibly?

VERITAS NetBackup (tm) 6.0 Release Notes for UNIX and Windows

VERITAS NetBackup (tm) 6.0 Release Impact Bulletin

VERITAS NetBackup (tm) 6.0 Release Notes Known Issues Documentation

VERITAS NetBackup (tm) Server and NetBackup Enterprise Server - Commands Man Page Addendum for nbemmcmd, vmpool, and vmquery commands on UNIX and Windows platforms.



Bob Stump
VERITAS - "Ain't it the truth?"
 
Bob,

The command you suggested is restricted by date/time. Not something that I can compare with after the backups have run.

jnbSA -lc output shows:
"/usr/openv/netbackup/bin/admincmd/bppllist" -allclasses -tzo -25200 -template -M pd7bs1no.prod.company.ca

When I click on the Netbackup Management/Policies/Summary of all polices. I want to be able to extract certain columns (NAME/Storage Unit/Active) via command line and have it formated in a table. Any suggestions on how to do that?

Joy
 
# bppllist -help
bppllist: [<policy name>] [-L|-l|-U] [-verbose] [-allpolicies]
[-M <master_server,...,master_server>]
[-hwos]
[-byclient <client>] [-keyword "keyword phrase"]

you could probably use the -l along with some text processing.



Bob Stump
VERITAS - "Ain't it the truth?"
 
pd7bs1no> vi getinactivepolicies.sh
"getinactivepolicies.sh" 11 lines, 361 characters
#!/bin/sh
master=`grep -v '^#' /usr/openv/netbackup/bp.conf|head -1|awk '{print $3}'`
[ -f /tmp/inactive_classes ] && rm /tmp/inactive_classes
#MAILLIST="root"
cd /usr/openv/netbackup/db/class
grep 'ACTIVE 1' */info > /tmp/inactive_classes
grep 'ACTIVE 0' */info >> /tmp/inactive_classes
if [ -s /tmp/inactive_classes ] ; then
cat /tmp/inactive_classes
else
echo "The subject says it all."
fi

GIVES:
pd7bs1no> sudo ./getinactivepolicies.sh
Password:
bpd2ms1no/info:ACTIVE 1
bpd2ms2no/info:ACTIVE 1
bpd2th1no/info:ACTIVE 1
bpd2ms3no/info:ACTIVE 0
bpd2ms4no/info:ACTIVE 0
pd7bs1no/info:ACTIVE 0
pd7doc1no/info:ACTIVE 0
pd7doc2no/info:ACTIVE 0
pd7doc3no/info:ACTIVE 0
pd7js1no/info:ACTIVE 0
pd7lh1no/info:ACTIVE 0
pd7sm1no/info:ACTIVE 0
pd7sm2no/info:ACTIVE 0
pd7th1no/info:ACTIVE 0
pd7th2no/info:ACTIVE 0

SOLVED!!!!
 
I have some clients that simply cannot have backups running during business hours. In order to ensure that immediate bacckups and user backups cannot run during business hours, I deactivate and activate the policies via cron

# crontab -l | grep -i activate
0 6 * * 1-5 /usr/local/scripts/policy-deactivate.sh
0 16 * * 1-5 /usr/local/scripts/policy-activate.sh

# cat /usr/local/scripts/policy-deactivate.sh
#! /bin/sh
for i in `/usr/bin/cat /usr/local/scripts/policylist`
do
/usr/openv/netbackup/bin/admincmd/bpplinfo $i -modify -inactive
done

# cat /usr/local/scripts/policy-activate.sh
#! /bin/sh
for i in `/usr/bin/cat /usr/local/scripts/policylist`
do
/usr/openv/netbackup/bin/admincmd/bpplinfo $i -modify -active
done


Bob Stump
VERITAS - "Ain't it the truth?"
 
Hi All,

I have a request to utilize flash backup for exchange server 2003. I am using netbackup v5.1mp5 and I checked out netbackup for exchange server doc and found below limitations & notes:

------------------------------------------------------------------------------------------------
Backup Limitations
The following limitations exist when using NetBackup Advanced Client with NetBackup
for Exchange Server.
? Snapshot backups are supported only for the full Information Store or storage groups.
Snapshot backups are not supported for Exchange mailboxes, the Site Replication
Service (SRS), the Key Management Service (KMS), or public folders.
? Differential and cumulative backups are not supported.
? Individual databases cannot be selected for backup or restore. The entire Information
store or a storage group must be selected for backup or the backup job will fail.
Notes
? Only Exchange objects will be included in a snapshot backup.
? Databases need to be mounted for backup.
? Advanced Client uses the Microsoft Volume Shadow Copy Service (VSS).
? Only Exchange 2003 on Windows 2003 is supported.
? Backups cannot be restored to an alternate location.
? A restore to an Exchange Recovery storage group is not supported.
---------------------------------------------------------------------

I am concerning "Backups cannot be restored to an alternate location", could anybody tell me if it indicates restore cann't be restored to an alternate client or just an alternate path? if it can only be restored to original client that will be a big problem for me.

thanks!
fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top