Video Screencast Help

Command to map retention level numbers to human readable values?

Created: 15 Jan 2014 • Updated: 15 Jan 2014 | 4 comments
This issue has been solved. See solution.

Does anybody know of  command to list all defined retention levels with their human readable values like "3 weeks", "8 months" etc?

It would nice to be able to dynamic do this in a script rather than having to hard code all the different values.


Comments 4 CommentsJump to latest comment

Nicolai's picture


For reference:

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

Marianne's picture

As per Nicolai's excellent post, use 

bpretlevel -U
(command location is admincmd as per TECH32538)

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

Bob -'s picture

Thanks.  I wish they would put stuff like this in the Command manual

CRZ's picture

Wow, it really ISN'T in the Commands Guide!  I have no idea why that is.

DOCUMENTATION: What is the length (in days) of a one month retention level, and how can it be determined with the bpretlevel command?

TECH32538 (which Nicolai posted above) is a great overview, but you can also use the -h command line switch to see the usage statement:

#bpretlevel -h
USAGE: bpretlevel [-s|-l|-L|-U] [-M master_server,...]
       bpretlevel {-r level period} | -d
           [-M master_server,...]

           Short listing
           Condensed listing
           Long listing
           User listing
       -r level period
           Change the retention period for a retention level
               Valid values for level:
               Valid values for period:
                   <#days> day|days|d
                   <#weeks> week|weeks|w
                   <#months> month|months|m
                   <#years> year|years|y
           Restore default retention periods for all retention levels

bpretlevel can be found on any server in the admincmd directory:

UNIX: /usr/openv/netbackup/bin/admincmd/bpretlevel
Windows: <install_path>\NetBackup\bin\admincmd\bpretlevel.exe

We'll see if we can get all this put in the next version of the Commands Guide. | APPLBN | 75LBN