Video Screencast Help

Detailed backup time and schedule for a policy in unix

Created: 21 Sep 2012 • Updated: 21 Sep 2012 | 9 comments
Varma Chiluvuri's picture
This issue has been solved. See solution.

Hi ...

   Can anyone help me how to check below outputs through commands in UNIX.

    1) Time taken for a backup to complete.

    2)  Backup schedule for a specific policy.

 

Thanks & Regards

Varma

Comments 9 CommentsJump to latest comment

Ashish-Sharma's picture

HI,

Check this thread may be help

https://www-secure.symantec.com/connect/forums/client-backups-report-through-command-line

DOCUMENTATION: The command line equivalents for running the NetBackup reports available in the NetBackup user interface

http://www.symantec.com/business/support/index?page=content&id=TECH20462

Thanks In Advance

Ashish Sharma

 

 

Andy Welburn's picture

& for question 2 if you *just* want the schedule information for a specific policy then:

 

bpplsched policy_name -U

 

for *all* policy details (which also includes the schedule info)

 

bppllist policy_name -U

Varma Chiluvuri's picture

Thanks Ashish and Andy

 

bpplsched worked smiley for me but bpimagelist for fetching backup details is throwing below error frown

 

# ./bpimagelist -U -A psdbt1v-nb -d 09/14/2012 -e 09/21/2012
bpimagelist: unrecognized option psdbt1v-nb
USAGE: bpimagelist [-media] [-l|-L|-U|-idonly] [-tape]
           [-d mm/dd/yyyy HH:MM:SS] [-e mm/dd/yyyy HH:MM:SS] [-hoursago hours]
           [-keyword "keyword phrase"]
           [-client client_name] [-server server_name]
           [-backupid backup_id] [ [-option option_name] ... ]
           [-policy policy_name] [-pt policy_type]
           [-rl retention_level]
           [-sl sched_label] [-st sched_type]
           [-class_id data_classification_id_guid] [-stl_complete]
           [-stl_incomplete] [-stl_name storage_service_name]
           [-M master_server...] [-v]
[root@sun107] /opt/openv/netbackup/bin/admincmd
 

 

# ./bpimagelist -U psdbt1v-nb -d 09/14/2012 -e 09/21/2012
bpimagelist: unrecognized option psdbt1v-nb
USAGE: bpimagelist [-media] [-l|-L|-U|-idonly] [-tape]
           [-d mm/dd/yyyy HH:MM:SS] [-e mm/dd/yyyy HH:MM:SS] [-hoursago hours]
           [-keyword "keyword phrase"]
           [-client client_name] [-server server_name]
           [-backupid backup_id] [ [-option option_name] ... ]
           [-policy policy_name] [-pt policy_type]
           [-rl retention_level]
           [-sl sched_label] [-st sched_type]
           [-class_id data_classification_id_guid] [-stl_complete]
           [-stl_incomplete] [-stl_name storage_service_name]
           [-M master_server...] [-v]
 

Thanks & Regards

Varma

 

Marianne's picture

You are missing '-client'

bpimagelist -l -d 06/07/2011 00:00:00 -e 06/08/2011 00:00:00 -client client | awk '/^IMAGE/ {print $2, $7, $15}'

Just tried it myself with -hoursago:

/root >bpimagelist -hoursago 4 -client Marianne-Win7 | awk '/^IMAGE/ {print $2, $7, $15}'
Marianne-Win7 MvdB 4677
Marianne-Win7 MvdB 2856

 
To get Kbytes instead of Policy name:
 
/root >bpimagelist -hoursago 4 -client Marianne-Win7 | awk '/^IMAGE/ {print $2, $19, $15}'
Marianne-Win7 73265655 4677
Marianne-Win7 12965937 2856
 
 
Elapsed time is in seconds.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

Andy Welburn's picture

If you're looking at the command from the T/N quoted earlier:

Client Backups Report
The Client Backups report shows detailed information on backups completed within the specified time period.  
# cd /usr/openv/netbackup/bin/admincmd
# ./bpimagelist -U [-A|-client name] [-d <start_date> <start_time> -e <end_date> <end_time>]

then you're mis-understanding the syntax slightly.

the -A will be for *all* clients so your client name is superfluous hence the error

e.g.

# ./bpimagelist -U -A -d 09/14/2012 -e 09/21/2012

without the -A you need -client client_name to produce the report for a specific client

e.g.

# ./bpimagelist -U -client psdbt1v-nb -d 09/14/2012 -e 09/21/2012

 

Ashish-Sharma's picture

Check Andy comments

Andy Welburn Trusted Advisor
 

DOCUMENTATION: What are the different fields in "bpimagelist -l" output?
http://www.symantec.com/business/support/index?pag...

Elapsed time is one of the output fields....

Also, bpimagelist -L will give these fields in a more readable form.

You could be looking at a lot of output so may want to "filter" your results somehow!

e.g.

bpimagelist -l -d 06/07/2011 00:00:00 -e 06/08/2011 00:00:00 -client client | awk '/^IMAGE/ {print $2, $7, $15}'

 

Thanks In Advance

Ashish Sharma

 

 

Varma Chiluvuri's picture

I am getting the detailed output from below command but I need only policy name and Kilobytes

 

./bpimagelist -U -A -d 09/14/2012 -e 09/16/2012

Thanks & Regards

Varma

 

Andy Welburn's picture

You'll just need to use the command per my post that Asish quoted then.

i.e.

bpimagelist -l -d 06/07/2011 00:00:00 -e 06/08/2011 00:00:00 -client client | awk '/^IMAGE/ {print $2, $7, $15}'

will produce output only of client name, policy & elapsed time (seconds) for backups between those times.

or something similar to suit your requirements.

 

***EDIT***

If you want to do the above command for ALL clients then ironically run it without the -A option (as well as without the -client client_name options)

e.g.

# bpimagelist -l -d 09/19/2012 -e 09/21/2012 | awk '/^IMAGE/ {print $2, $7, $15}'
client2 policy2 445
client2 policy2 579
client4 policy4 2596
client4 policy4 2666
client6 policy6 2240

 

SOLUTION