Problem

DOCUMENTATION: How to configure Veritas NetBackup (tm) to write Unified and Legacy log files to a different directory

Solution

Manual:  
Veritas NetBackup (tm) 6.0 Troubleshooting Guide for UNIX and Windows, Page: 75-76
Veritas NetBackup (tm) 6.5 Troubleshooting Guide for UNIX, Linux, and Windows, Page: 82-83
Veritas NetBackup (tm) 7.0 Troubleshooting Guide for UNIX, Linux, and Windows, Page: 85-86

Modification Type:  Addition

Modification:
NetBackup 6.x introduced a new type of logging, referred to as unified logging.  This style of logging is used by new NetBackup daemons, such as the Intelligent Resource Manager (IRM) and the Enterprise Media Manager (EMM) daemons.  Unified logs are written to the /usr/openv/logs directory on UNIX systems or the <install_path>\NetBackup\logs directory on Windows systems. An example of a log file that would be generated would be: 51216-111-990921226-060318-0000000000.log

By default, the maximum log file size in unified logging is 5120 KB. After a log file reaches 5120 KB, the file is closed and a new log file is opened. NetBackup will also keep 28 days of logging, by default.  As such, the logs folder can quickly fill up and absorb all available drive space. In this condition it may be necessary to change the default log location to a volume or drive with more available disk space.

Note: This process does not affect legacy log files stored in the /usr/openv/netbackup/logs on UNIX systems or the<install_path>\NetBackup\logs\<process> directories on Windows systems.  In legacy debug logging, each logging directory must be manually created for each process.  For example, the bpsched process is logged in /usr/openv/netbackup/logs/bprd on UNIX or <install_path>\NetBackup\logs\bprd on Windows.

Procedure to change the location where unified log files are written:

1. On a volume or drive with sufficient free space to store unified logging, it will be necessary to create a new directory in which to store the new log files.
 

On UNIX systems: 

    # mkdir <new_log_dir>
 

On Windows systems: 

     % mkdir <new_log_dir>
 

Where<new_log_dir> is the name of the directory where the unified logs will be moved to, and new unified logs will be written to. 
 
 
2.  The NetBackup daemons will need to be stopped before making any changes to the default log directory.  This should be done when there are no active jobs running.  This will ensure no daemons are writing to existing log files when they are being moved.  To shut down NetBackup:
 
On UNIX systems:    

     # /usr/openv/netbackup/bin/goodies/netbackup stop
 

On Windows systems:    

     % <install_path>\NetBackup\bin\bpdown.exe
 

3. Move the existing unified logs to the new location.  This will preserve existing unified log files.  Once the log files have been moved, verify the files exist in the new path.    Note: This will only move the *.log files related to unified logging.  For Windows, it will not move any legacy process directories that have been created.
  
To move the log files,
 
 On UNIX systems:
    # mv /usr/openv/logs/*.log <new_log_dir>
  
On Windows systems: 

    % move <install_path>\NetBackup\logs\*.log <new_log_dir>
 

 To verify the logs have been successfully moved, 

On Unix systems:
          # ls <new_log_dir>

 On Windows systems:
          % dir <new_log_dir>
 
4. Set the new log directory location for NetBackup unified log originators.
 
The vxlogcfg command is used to set the default log directory for all NetBackup originators.  It is also possible to configure log locations for specific originators.  Refer to the Veritas NetBackup (tm) Troubleshooting Guide in the "Related Documents" section, found below, for additional details on these options.
  
On UNIX systems: 

    # /usr/openv/netbackup/bin/vxlogcfg -a -p 51216 -o Default -s "LogDirectory=<new_log_dir>"
  

For Windows systems: 

    % <install_path>\NetBackup\bin\vxlogcfg -a -p 51216 -o Default -s "LogDirectory=<new_log_dir>"
 

For Windows systems use the 8.3 format for LogDirectory=<new_log_dir> directory names.   This is the format that any of the default values will use.  
   Example:  "C:\PROGRA~1\VERITAS\..." instead of "C:\Program Files\VERITAS..".
 
5. Verify the settings in the nblog.conf file.
 
     For NetBackup 7.0 the fundamental principles for how the LogDirectory are outlined below:
 
a) The Default.LogDirectory setting represents the base logging directory for unified log.  On unix this is /usr/openv/logs.  On windows it is <install path>\NetBackup\logs
 
b) Daemons will log to subdirectories under the base logging directory.  These subdirectories are automatically created with the name defined in nblog.conf for each  originator id.  
     For example, EMM has originator 111.   The LogDirectory for EMM is set to "nbemm", with the following line in the nblog.conf file:
         111.LogDirectory=nbemm   
     Thus, EMM will log to /usr/openv/logs/nbemm on Unix, and <install path>\NetBackup\logs\nbemm on Windows. 
 
c) By convention, all originators LogDirectory settings will match the setting for OIDNames which will also match the daemon name.
 
d) If the user chooses to create a new base log directory on another drive or partition where more space exists for the logs, they need only create the base logging directory as described in this TN.   Unified logging will automatically create the subdirectories.
 
The nblog.conf file will contain unified log settings for the Default.LogDirectory and may contain additional pointers for each NetBackup originator.  This TechNote does not address all available resources for unified logging and is only concerned with moving the Default.LogDirectory resource.
 
Verify that the Default.LogDirectory now displays the correct path to the new log directory.  At this time also check for any overrides that have been set for individual originators.  It is not required to change other originators to match the default setting.  This step just highlights what other directories are being used to write unified log files. Other Symantec products such as the NetBackup Operations Manager (NOM) will have different log directories set for it's own originators (146, 147, 148).  By default, these log files are written to other directories.
  
On UNIX systems: 
# grep LogDirectory /usr/openv/netbackup/nblog.conf
 
Default.LogDirectory=new_log_dir 
146.LogDirectory=/var/VRTSnomweb/log/ 
147.LogDirectory=/var/VRTSnomweb/log/ 
148.LogDirectory=/opt/VRTSnom/logs/
 
For Windows systems:
 
Open <install_path>\NetBackup\nblog.conf and search for any LogDirectory entries to verify the settings. 
6. Restart the NetBackup daemons for the changes to take effect.    Once NetBackup is restarted it will begin writing unified log files in the new directory. 
  
On UNIX systems:
# /usr/openv/netbackup/bin/goodies/netbackup start
 
On Windows systems: 
% <install_path>\VERITAS\NetBackup\bin\bpup.exe
  
7. Verify that vxlogview is able to process the log files in their new location.
 
The example below will display all the unified log entries that have been generated in the last five minutes.
 
On UNIX systems: 
# cd /usr/openv/netbackup/bin
 # ./vxlogview -p 51216 -t 00:05:00
  
For Windows systems: 
% cd install_path\NetBackup\bin 
% vxlogview -p 51216 -t 00:05:00
 
Note: Unlike the files written in legacy logging, unified logging files cannot be easily read with a text editor. The unified logging files store messages in a codified format that needs to be interpreted with vxlogview. The vxlogview command must be used to assemble and display the complete log information correctly.

Procedure to change the location where the legacy log files are written:

NOTE: for either Unix or Windows  systems, this procedure should be followed after stopping NetBackup daemons/services.  Also, previously written log files will reside in their original location following this procedure.   The logs may remain in this location, deleted, or moved to the new log location.

For Unix systems:  The standard hard coded logs path Netbackup writes the logs to is /usr/openv/netbackup/logs, and it cannot be changed.
If /usr/openv is filling up, it is often desirable to change the log directory to a different file system. 

1.  Create the new log directory
     # mdkir -p /new_filesystem/netbackup/logs

2) Give the directory 755 permissions
     # chmod 755 /new_filesystem/netbackup/logs

3) Navigate to /usr/openv/netbackup/ and rename the existing logs directory
    # mv logs logs_old

4) Create the symbolic link to the new legacy log location
     # ln -s /new_filesystem/netbackup/logs logs

5) Verify the link was created successfuly
     # ls -l /usr/openv/netbackup/logs
     lrwxrwxrwx 1 root root 25 Apr 6 14:31 logs -> /new_filesystem/netbackup/logs

6) Verify that legacy logs are being written to the new location.  This can be done by creating commonly used log directories (such as bpcd, vnetd, bpbkar) under /new_filesystem/netbackup/logs, starting NetBackup, and running a test backup.   Then inspect the log directories to ensure a new log file is created.

 
For Windows systems:
 
1. Edit the Log Directory registry key
 
- Open the registry by running regedit
- Navigate to HKLM\Software\Veritas\NetBackup\CurrentVersion\
- On the right pane double click on "Log Directory" and specify the path to the new log directory, e.g. E:\NBU\Logs. The folder must already exist.
 
The steps above will redirect where the client based logs will go, e.g. bpbkar, bpcd, inetd, etc.  To have all the logs redirected to a new location,  perform the following actions:

2. Add the following value within the registry to make sure all the (master and media process) log directories, as made by the batch file, are correctly written Within the VERITAS\NetBackup\CurrentVersion\Paths key, add a string value called "BP_LOGS".  The value does not exist by default, so it will have to be created.  Its value will be a string directory path.  The following format must be deployed when entering this type of string value:

Actual path to the logs directory:
D:\Logs

Path to enter into the string value:
D:${_PS.EN_US}Logs

 
The new log directory will also have to be manually created in the new location.  If NetBackup's mkdir.bat file (the batch file that creates all of the log directories) is used, it will have to be moved to the new location and executed there.  Additionally, the ALTPATH directory within <Install_Path>\netbackup\logs should remain in the original location.

Once the Log Directory key is modified and NetBackup is restarted, legacy logs will be written to this location.

 
Note: Incorrect use of the Windows Registry Editor can have disastrous results on a server operating system.  Great care should be taken when making changes to a Windows Registry.  Registry modifications should only be carried out by persons experienced in the use of the Registry Editor application.

How to configure Veritas NetBackup (tm) to write Unified and Legacy log files to a different directory的更多相关文章

  1. NBU7.0.1迁移C:\Veritas\Netbackup\db到其他盘

    原来NBU MASTER安装在C盘了,导致C盘空间剩余很少,在官网找了一个解决方案如下: - before any operation, of course backup your catalog a ...

  2. Veritas NetBackup™ 状态码"十大"常见报错状态码

    我在刚开始学习Netbackup的时候,没少走弯路.经常会遇到各种稀奇古怪的 error 信息,遇到报错会很慌张,急需一个解决问题的办法.跟无头苍蝇一样,会不加思索地把错误粘到百度上,希望赶紧查找一下 ...

  3. VERITAS NETBACKUP运维手册(自制)

    ps:本文为目录.详情请点如下目录超链接 1 VERITAS NETBACKUP介绍 1.1 NBU基本概念 1.2 配置存储单元 1.3 配置备份策略(Policy) 1.4 配置NetBackup ...

  4. 安装RabbitMQ编译erlang时,checking for c compiler default output file name... configure:error:C compiler cannot create executables See 'config.log' for more details.

    checking for c compiler default output file name... configure:error:C compiler cannot create executa ...

  5. Veritas NetBackup 8.1.2 升级的主要理由--附升级兼容性检查网址

    管理更简单 NetBackup™ 8.1.2 基于 Web 的全新直观用户界面让操作变得极度简单化,最常用操作现在只需单击几次或触摸几下即可完 成.通过台式机或移动设备可为不同角色的其他用户授予访问权 ...

  6. NBU expired Media,Media ID not found in EMM database

    Subject:When attempting to expire a media in Veritas NetBackup (tm) 6.0 with the bpexpdate command, ...

  7. (转)单机上配置hadoop

    哈哈,几天连续收到百度两次电话,均是利好消息,于是乎不知不觉的自己的工作效率也提高了,几天折腾了好久终于在单机上配置好了hadoop,然后也成功的运行了一个用例,耶耶耶耶耶耶. 转自:http://w ...

  8. Atomikos 中文说明文档【转】

    Atomikos 翻译文档(英文文档来源:下载安装包中START_HERE.html)                                  ----译者:周枫 请尊重劳动成果,转载请标明 ...

  9. Atomikos实现多数据源的事物管理

    之前试过使用Spring动态切换数据库,通过继承AbstractRoutingDataSource重写determineCurrentLookupKey()方法,来决定使用那个数据库.在开启事务之前, ...

随机推荐

  1. HDU--1213--How Many Tables--并查集

    How Many Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)T ...

  2. scp不可用:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! After doing ssh are you seeing this error.No proble ...

  3. 块级元素 Vs 内联元素

    HTML的元素可以分为两种: 块级元素(block level element ) 内联元素(inline element ) 二者的区别如下: 1. 块级元素独占一行(除非显示修改元素的displa ...

  4. 怎么做一个bat文件

    怎么做一个bat文件 | 浏览:639 | 更新:2014-11-25 17:02 1 2 3 4 5 6 7 分步阅读 其实做一个.BAT文件很简单,下面我就以做一个清除系统垃圾.BAT文件为例,给 ...

  5. oracle、mysql、sql server等;流行数据库的链接驱动配置

    系统的写博客的时间不多,但是还想一直写来坚持,就没事写写积累下来的知识点吧 #ORACLE #jdbc.driver=oracle.jdbc.driver.OracleDriver#jdbc.url= ...

  6. (spring-第18回【AOP基础篇】) 创建切面

    一.   在创建增强一节中,增强被织入到目标类的所有方法中,假设我们希望有选择地织入到目标类某些特定的方法中,就需要使用切点进行目标连接点的定位. 二.   spring通过org.springfra ...

  7. sphinx 增量索引 实现近实时更新

    一.sphinx增量索引的设置   数据库中的已有数据很大,又不断有新数据加入到数据库中,也希望能够检索到.全部重新建立索引很消耗资源,因为我们需要更新的数据相比较而言很少.例如.原来的数据有几百万条 ...

  8. linux dns 连外网

    以下设置对所用的Linux系统如Redhat/Ubuntu/Debian/CentOS等都有效,但您必须是管理员root或者具有管理员权限 vim /etc/resolv.conf 在其中加入: na ...

  9. Anchor 对象和document对象

    <script type="text/javascript"> function chanklink(){ document.getElementById(" ...

  10. codeforces298c

    link:http://codeforces.com/problemset/problem/298/C 这道题目可以看出来我智商确实拙计 #include <iostream> #incl ...