Previous  |  Next >  
Product: NetBackup System Administrator's Help  

Changing the Default Temporarily

In the absence of a bp.conf entry, the bpdbjobs process determines how long to retain a job by checking the following locations in the order indicated:

  1. The bpdbjobs command-line options.
  2. The BPDBJOBS_OPTIONS environment variable. See BPDBJOBS_OPTIONS Environment Variable.
    Caution  Caution    Keep in mind that the bpdbjobs database resets to default conditions (done jobs deleted after three days) upon reboot or cycling NetBackup Services. If you choose to change the default using a temporary method, you must reinitiate the method after every reboot or each time the NetBackup services are cycled.
    To change the default on a permanent basis, see


bpdbjobs Command Line Options

The bpdbjobs command interacts with the jobs database to delete or move done job files. The command line options are the first location that the bpdbjobs process checks for instructions on retaining jobs.

The -clean option causes bpdbjobs to delete done jobs older than a specified time period:

bpdbjobs -clean [ -M <master servers> ]
[ -keep_hours <hours> ] or [ -keep_days <days> ]
[ -keep_successful_hours <hours> ] or
[ -keep_successful_days <days> ]

For example:

bpdbjobs -clean -keep_hours 720
For a complete description of the bpdbjobs command, see NetBackup Commands for .

BPDBJOBS_OPTIONS Environment Variable

The BPDBJOBS_OPTIONS environmental variable provides a convenient way to set job retention options using a script.

The options listed below can be used to determine the length of time NetBackup retains jobs. The options should be entered in lower case in the BPDBJOBS_OPTIONS environmental variable:

  • -keep_hours hours
  • Use with the -clean option to specify how many hours bpdbjobs keeps unsuccessful done jobs. Default: 72 hours.
    To keep both successful and failed jobs longer than the default of 72 hours, keep_successful_hours must be used in conjunction with keep_hours
  • -keep_successful_hours hours
  • Use with the -clean option to specify how many hours bpdbjobs keeps successful done jobs. The number of hours can range from 3 to 720 but must be less than or equal to keep_hours.
    Values outside the range are ignored. Default: 72 hours.
  • -keep_days days
  • Use with the -clean option to specify how many days bpdbjobs keeps done jobs. Default: 3 days.
  • keep_successful_days days
  • Use with the -clean option to specify how many days bpdbjobs keeps successful done jobs. Default: 3 days.
    This value must be less than the -keep_days value.

In the following example, a script (cleanjobs) was created which can be copied directly from this document, then changed according to your needs.

  • The first line specifies how long to keep unsuccessful jobs (24 hours) and successful jobs (five hours).
  • The second line specifies the path to the bpdbjobs command. The correct location of bpdbjobs must be indicated. In this example, NetBackup was installed in the default location:

  •    setenv BPDBJOBS_OPTIONS "-keep_hours 24 -keep_successful_hours 5 -clean"
       /usr/openv/netbackup/bin/admincmd/bpdbjobs ${*}

The .bat file can be stored anywhere, as long as it is run from the appropriate directory.

 ^ Return to Top Previous  |  Next >  
Product: NetBackup System Administrator's Help  
VERITAS Software Corporation
www.veritas.com