Pages

Categories

Archives

[Google]

Sponsored Links

netbackup reports

This is a script I wrote to generate netbackup reports, i pop error codes in so people do not have to look it up. I really need to update it.

 

#!/bin/bash

#

# SCRIPT TO CHECK FOR BACKUP FAILURES

#

# ERROR CODES

# 1 – operation was partially successful

# 12 – Linux root filesystem remounted

# 13 – Windows share point

# 21 – Windows Network problem

# 23 – Windows Network Problem

# 24 – File System taking to long to produce list of files (multi os)

# 25 – Mixed 23/25  & 58 failures on windows

# 41 – Windows bug

# 48 – Netbackup installed? Provisioned?

# 57 or 58 Machine crash/power fail, netbackup running?

# 59 – Client does not recognise media server (multi OS)

# 96 – Ran out of tape, contact IPAH

# 150 – backup admin cancelled running backup (nothing you can do)

# 156 – snapshot error on windows host, check disk space or for stuck vss process

# 196 – Backup window closed before tape became available

# ./bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T`

# ./bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T` | grep -v   “0    vzdf”

#

 

#function usage {

# cat << EOF

# Usage: $0 <ticket number>

# EOF

# exit 1

#}

#

#if [ $# -ne 1 ]; then

# usage;

#fi

 

PATH=$PATH:/usr/openv/netbackup/bin/admincmd

TICKET=$1

#cd /usr/openv/netbackup/bin/admincmd

error_codes=(1 12 13 21 23 24 25 41 48 57 58 59 96 150 156 196)

 

echo “### BACKUP REPORT ###” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

echo “### ERROR CODE MEANING ###” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

echo “# 1 – operation was partially successful

# 12 – Linux root filesystem remounted

# 13 – Windows share point

# 21 – Windows Network problem

# 23 – Windows Network Problem

# 24 – File System taking to long to produce list of files (multi os)

# 25 – Mixed 23/25  & 58 failures on windows

# 41 – Windows bug

# 48 – Netbackup installed? Provisioned?

# 57 or 58 Machine crash/power fail, netbackup running?

# 59 – Client does not recognise media server (multi OS)

# 96 – Ran out of tape, contact IPAH

# 150 – backup admin cancelled running backup (nothing you can do)

# 156 – snapshot error on windows host, check disk space or for stuck vss process

# 196 – Backup window closed before tape became available ” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

#

echo “###  Hosts with Errors  ###” >> backup_report.$TICKET

bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T` | grep -v “0    vzdf” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

for i in “${error_codes[@]}”

do

echo “### Error code $i ###” >> backup_report.$TICKET

bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T` | grep “$i    vzdf” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

done

echo ” ” >> backup_report.$TICKET

echo “### SUCCESSFUL BACKUPS ###” >> backup_report.$TICKET

bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T` | grep “0    vzdf” >> backup_report.$TICKET

echo ” ” >> backup_report.$TICKET

echo “###  Full Report  ###” >> backup_report.$TICKET

bperror -U -backstat -s info -d `date –date=”yesterday” +%m/%d/%Y` 23:59:00 -e `date +%m/%d/%Y` `date +%T` >> backup_report.$TICKET

Comments are closed.