cancel
Showing results for 
Search instead for 
Did you mean: 

Script to execute the status of backups

reachah
Level 4

Hi,

I have a NB Master SunOS  5.10 , NB 7.1v

I do not have Ops-Centre in my environment ,hence need to implement a script for the below requirement,

1) Need to get the backup status i.e., Success or failed with error codes

2) Backup type,schedule,last successful backups

3) Date range either individual date i.e., previous date\night backups alone & also to specify the date range i.e.,for the last one week

4) Size of the backups & expiration date

 

Kinldy assist ...

 

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

It could be a bit convoluted as will require input from more than one source

 

e.g.

 

bperror -backstat -U (will detail all jobs over the last 24 hours & their status (for failed jobs this may be your only option?) - depending on your master settings this could potentially be only held for the last 3 days)

bpimagelist could be used for more in-depth reporting of successful jobs re: size, retention, last successful etc (see example here for some idea(s): https://www-secure.symantec.com/connect/forums/script-executionparameters#comment-10955651 )

Unless any of the canned reports are more what you're looking for in the Admin Console?

View solution in original post

2 REPLIES 2

Andy_Welburn
Level 6

It could be a bit convoluted as will require input from more than one source

 

e.g.

 

bperror -backstat -U (will detail all jobs over the last 24 hours & their status (for failed jobs this may be your only option?) - depending on your master settings this could potentially be only held for the last 3 days)

bpimagelist could be used for more in-depth reporting of successful jobs re: size, retention, last successful etc (see example here for some idea(s): https://www-secure.symantec.com/connect/forums/script-executionparameters#comment-10955651 )

Unless any of the canned reports are more what you're looking for in the Admin Console?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Your reporting needs say to me that OpsCentre is a MUST in your environment.

Why re-invent the wheel? 

As per Andy's excellent post - there is no single command or report that will give all the info that you need.
The information that you need is pulled from 2 separate databases - error and image.
bperror (error database) will report on all backups - failed and successful. Default days to keep 28 days.
bpimagelist (image database) can only report on successful backups (size & expiration date). Info retention is determined by the backup retention.

The jobs database (bpdbjobs -most_columns) contain most info you need, but not expiration date.
This is the info you see in Activity Monitor and is kept for 3 days.