DOCUMENTATION: How to configure automatic cleanup and recycling of unified log files with Veritas NetBackup (tm) 6.0/6.5

Article:TECH44292  |  Created: 2005-01-10  |  Updated: 2010-01-12  |  Article URL http://www.symantec.com/docs/TECH44292
Article Type
Technical Solution

Product(s)

Environment

Issue



DOCUMENTATION: How to configure automatic cleanup and recycling of unified log files with Veritas NetBackup (tm) 6.0/6.5

Solution



Manual:  Veritas NetBackup (tm) 6.0 and 6.5 Troubleshooting Guide for UNIX and Windows
Modification Type:  Addition

Modification:
The NetBackup 6.0/6.5 Troubleshooting Guide for UNIX and Windows offers two methods to clean unified (VxUL) log files.

Setting Log File Retention
Regarding the Keep logs For setting in the Clean-up dialog under Host Properties:
- Logs that exceed the number of days specified by the Keep logs For setting will be deleted for unified and legacy logging.
- Unified logging log files can also be deleted explicitly using the vxlogmgr command. If files are not manually deleted or moved using vxlogmgr, the Keep logs For setting will remove the old logs, both for unified and legacy logging.

The NetBackup 6.0 Maintenance Pack 4 (MP4) release offers a new LogRecycle option and changes the behavior for recycling unified log files.  This TechNote will elaborate on these two cleanup options as well as the new LogRecycle option available with MP4.  

Using the "Keep Logs For" setting
By default, cleanup of unified logging will be done automatically using the Keep logs For setting.  The default setting will remove log files that are older than 28 days.   Changing this setting will recycle both unified and legacy logs older than X days when the automatic log cleanup occurs at midnight.  

To set the Keep Logs For value in the NetBackup administration console,  go to Host Properties > Master Servers.  In the properties window for the master,  select Clean-up and enter the value to Keep Logs For.  This can also be changed using the bpconfig command.

To change the number of days to keep logs on the command line use:  
# /usr/openv/netbackup/bin/bpconfig -kl <days>

Starting with NetBackup 6.0 MP4, the new LogRecycle option can be used to clean up unified log files.  If this option is enabled, the Keep logs For setting will only be used to clean up legacy log files.

Using the LogRecycle option with NetBackup 6.0 MP4
Starting with the NetBackup 6.0 Maintenance Pack 4 (MP4) release, a new LogRecycle option exists for recycling unified log files.  By default, this option is not enabled and must be set using the vxlogcfg command.  When log recycling is enabled, it ensures that the number of log files for each originator ID (OID) does not exceed the value specified by the NumberOfLogFiles setting.  

Note: This setting does not affect logs for the Veritas Private Branch Exchange (PBX) software.  PBX has not been updated to use the LogRecycle option.  This is being considered for a future maintenance pack.  A specific release was not available at the time this TechNote was modified.  To manage PBX log files see the section below on using vxlogmgr to manually delete log files.

To enable log recycling as the default for all NetBackup originators run:
# vxlogcfg -a -p 51216 -o Default -s LogRecycle=true

To enable log recycling for a specific NetBackup originator run:
# vxlogcfg -a -p 51216 -o <oid> -s LogRecycle=true
Note:  It will be necessary to restart NetBackup for these changes to take effect.

Caution should be used when enabling log recycling under NetBackup 6.0 MP4 and above.  It is important to determine how much logging information will be available with the NumberOfLogFiles setting.  By default, NetBackup is configured to keep three log files with a maximum file size of 5meg a piece. These default settings will be inadequate for any in-depth troubleshooting of NetBackup if log recycling is enabled.  It will be necessary to configure the NumberOfLogFiles and RolloverMode settings so they are appropriate to the amount of logging information required before enabling log recycling.  For more information on the NumberOfLogFiles and RolloverMode settings, refer to TechNote 279541, found below, in the Related Documents section.

Using the vxlogmgr command to manually delete logs
For systems that are not yet running NetBackup 6.0 MP4, or to manage PBX logs, the vxlogmgr command can be used to manually delete only unified log files.  It can be used to remove log files based on the NumberOfLogFiles setting.  By itself, the NumberOfLogFiles will not automatically remove log files.  This value will only determine the maximum number of days to keep logs when running unified log commands such as vxlogmgr.  The following steps can be taken to configure a separate value for cleaning unified log files if the nightly Keep Logs For setting is not sufficient.

Use the vxlogcfg command to configure the NumberOfLogFiles setting.  The following example will keep five days worth of logs when using vxlogmgr to delete log files.  These entries are case sensitive and must be entered exactly as shown or the error "V-1-8-12 Warning! Invalid setting" will occur.
# cd /usr/openv/netbackup/bin
# ./vxlogcfg -a -p 51216 -o Default -s NumberOfLogFiles=5
Note: It will be necessary to restart NetBackup for these changes to take effect.

To configure the log cleanup for PBX run the following command.
# ./vxlogcfg -a -p 50936 -o 103 -s NumberOfLogFiles=5
Note: It will be necessary to restart PBX for these changes to take effect.

To manually delete unified log files,  use the vxlogmgr command.  This will prompt the admin to remove log files in the /usr/openv/logs directory that are greater than NumberOfLogFiles.  This command will not impact legacy logs.
# /usr/openv/netbackup/bin
# ./vxlogmgr -a -d
To remove only the PBX logs use the following command instead.
# ./vxlogmgr -a -d -p 50936 -o 103

The "-q" quiet option can be used to skip the prompt confirming the deletion of the logs.  This switch can be used to run the vxlogmgr command from cron to automatically clean unified log files.

Supplemental Materials

SourceUMI
ValueV-1-8-12
DescriptionNetBackup UMI V-1-8-12: Warning! Invalid setting .

SourceETrack
Value230899
DescriptionEtrack (NetBackup) 230899: Enhancement request: Adding log recycle functionality


Legacy ID



279590


Article URL http://www.symantec.com/docs/TECH44292


Terms of use for this information are found in Legal Notices