如何在Linux系统上安装和配置Backup Exec 12.5 Oracle Agent

 
一、安装部分
Backup Exec
是一款主要用于 Windows 平台的数据保护产品,但是它也包含了用于 Linux Unix 的代理程序。要清楚你所使用的 Backup Exec 支持哪些 Linux Unix 系统,请访问技术支持网站上的软件兼容性列表,以现在用户数量最多的 BE10d 为例,它的兼容性列表网址是:

http://support.veritas.com/docs/278254

你可以在软件兼容性列表中发现两个用于 Linux Unix 的代理产品,它们的兼容性不同:
Remote Agent for Linux and UNIX Servers (RALUS) Compatibility //
RALUS ,新的代理程序,收费,性能较高。
Legacy Linux/UNIX/Mac Compatibility  //
传统的代理程序,免费,性能较低,以后会被 RALUS 取代。

查过兼容性列表之后,如果你所使用的操作系统包括在兼容性列表之中,就可以考虑采用 Backup Exec 来保护你的系统。如果兼容性列表中没有列出你所使用的系统,则可能存在兼容性问题,建议先进行测试,确认可以使用再购买。

下面将介绍 RALUS 的安装( Legacy Agent 现在很少有人使用,就不介绍了)

下面假定你的 Media Server (安装有 Backup Exec 的备份服务器)己经安装好,并且安装了 RALUS 选件。

首先, RALUS 的安装程序较大,被放在单独的光盘中提供。如果没有安装光盘,也可以通过 Symantec 网站下载:

http://support.veritas.com/docs/279329

下载的安装包是压缩的,需要先解包,光盘中的安装程序不是压缩的,可以直接安装。下面是我的安装记录(用的是 BE11d RALUS 安装程序),中间加了一些解释(红色部分)。

[root@redhatas3 /]#
mount /mnt/cdrom
[root@redhatas3 /]#
cd /mnt/cdrom
[root@redhatas3 cdrom]#
./installralus     // 执行安装脚本

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
Enter the system names separated by spaces on which to install RALUS: (redhatas3)  //
输入目标主机名称
Checking system communication:
    Checking OS version on redhatas3 ........................ Linux 2.4.21-32.EL
    Checking system support for redhatas3 ... Linux 2.4.21-32.EL supported by RALUS
Initial system check completed successfully.
Press [Return] to continue:

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
installralus will install the following RALUS packages on Linux target system: redhatas3
VRTSvxmsa        VERITAS - VxMS Mapping Service, Application Libraries.  //
两个安装包需要安装
VRTSralus        VERITAS Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers
Press [Return] to continue:

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
Checking system installation requirements:
Checking RALUS installation requirements on Linux target systems: redhatas3
Checking RALUS installation requirements on redhatas3:
    Checking file system space ................... required space is available
Installation requirements checks completed successfully.
Press [Return] to continue:

    Checking for Port 10000 ............................................. Done   //
RALUS 服务监视在 TCP 10000 端口,确保没有其它应用使用该端口。

                      Remote Agent Media Server Configuration                     
To display the Remote Agent as a selection in a media server's backup selection tree, and to be able to specify a local network for use between the Remote Agent and a media server, enter the names or IP addresses of the media servers that you want the Remote Agent to communicate with.
        An IP Address: XXX.XXX.XXX.XXX
        A Host Name: COMPUTERNAME
Enter a directory host:mybeserver   //
输入备份服务器的名称, RALUS 会定期向备份服务器通告自己的存在,收到通知后备份服务器会在备份选择窗口中显示该 Linux/Unix 主机。

      

Do you want to add another name or address for this agent? [y, n] (n)

                      Remote Agent Media Server Configuration                     
Hostnames and/or IP addresses verification:
        Address: mybeserver
Is this information correct? [y, n] (y)

                           Remote Agent User Group Setup                           
To perform backups, you must have a 'beoper' user group. This user group can be created only if you are not using NIS server. Your system will be scanned to detect a NIS server, group and membership.

Press [Return] to continue:
    Checking if system uses NIS server: .................................. No
The installer will now check your system for the 'beoper' user group and root membership.

Press [Return] to continue:
    Checking for 'beoper' user group: .............................. Not Found
    Checking for 'root' user membership in 'beoper' user group: .... Not Found
You can create 'beoper' user group manually or you can choose to have it created automatically.
Do you want installer to create 'beoper' user group? [y, n] (y)
Do you want to use specific group ID when creating 'beoper' user group? [y, n] (n)

    Creating group 'beoper': ............................................ Done  //
如果系统不采用 NIS 管理用户,安装向导会在本地组中添加 beoper 组,属于 beoper 组中的用户可以用于备份该主机上的资源,在备份服务器连接该主机时使用。

Do you want to add the 'root' user to 'beoper' user group? [y, n] (y)

    Adding 'root' user to 'beoper' user group: ......................... Done  //
如果将 root 用户加入 beoper 组,则可以在备份服务器使用 root 用户连接到该主机,可备份或恢复根下的所有文件和目录。

Press [Return] to continue:
Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
will upgrade from Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers.
    Checking VRTSvxmsa package ................................. not installed
    Checking VRTSralus package ................................. not installed
Press [Return] to continue:

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
Base pre Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers. uninstall failed!
    Installing VRTSvxmsa 4.4 on redhatas3 .................... done 1 of 2 steps
    Installing VRTSralus 11.00.6235 on redhatas3 ............. done 2 of 2 steps
Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers. installation completed successfully.

Press [Return] to continue:   //
创建启动脚本,并在 rc2.d,rc3.d rc5.d 中创建软链接,以便在系统启动时自动启动 RALUS 服务。

    Copying new initialization scripts .................................. Done
    Creating RALUS linkedname in rc2.d .................................. Done
    Creating RALUS linkedname in rc3.d .................................. Done
    Creating RALUS linkedname in rc5.d .................................. Done
    Updating RALUS files for beoper ..................................... Done

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers 11.00.6235
Configuring Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers.:
    Creating configuration files ........................................ Done

Symantec Backup Exec for Windows Servers Remote Agent for Linux/Unix Servers. configured successfully.
Press [Return] to continue:
The response file is saved at:
    /var/tmp/vxif/installralus206140849/installralus206140849.response
The installralus log is saved at:
    /var/tmp/vxif/installralus206140849/installralus.log

//
最后给出了安装日志的位置,可以通过查看这些日志了解安装完成情况。

二、配置部分
BE11d
Oracle Agent 与以前的版本有本质的不同,它采用 RMAN 来备份 Oracle 数据库,也支持 Linux 系统上的 Oracle 数据库,很多用户对它的配置还不熟悉,特别是在 Linux 系统上的配置,下面是我所做的一个配置实例。中文部分是我加的说明。

[root@ora10g lib]#
/opt/VRTSralus/bin/AgentConfig // 安装好 RALUS 之后,请使用 root 用户来配置代理程序。

Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection:
1 // 要完成两个部分的配置,数据库访问和 Oracle 实例,下面先配置数据库访问。

Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection:
1 // 添加新的 Linux 系统级访问凭据。
Enter a user name that has local system credentials: oracle // Oracle
Linux 上面的用户,它必须是 beoper 组的成员。 usermod -G 将用户加入多个组 // usermod –G group username
Enter the password:
Re-enter password:
Validating credentials.......
Do you want to use the full computer name/IP address for Oracle operations? (Y/N):
n // 指定名字的好处是,避免因为计算机名字或 IP 地址的变化导致 Recovery Catalog 中的记录信息混乱。
Do you want to use a custom port to connect to the media server during Oracle operations? (Y/N):
n

//
默认的端口号是 5633 ,建议不要改动它,除非这个端口己经被其它应用程序占用,如果这里做出了改变,介质服务器端也要做同样的修改。

Commit Oracle operation settings to the configuration file? (Y/N):
y
SUCCESS: Successfully added the entry to the configuration file.

//
上述配置中的计算机名(如果没有指定就是在介质服务器上连接这台机器时所使用的名字或 IP 地址),用户名和密码必须也介质服务器全局选项中 Oracle 选项页中配置的为 Oracle DB2 所设置的验证信息完全一致。

Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection:
5

Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection:
2 // 下面来配置 Oracle 实例信息。

If this computer is a RAC node, you must perform additional steps for configuration before you continue. Refer to the readme for these additional steps.

Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection:
1
Select an Oracle instance to configure
Entry 1. orcl //
如果 RALUS 检测到了系统中的 Oracle 实例,实例名会列在这里供用户选择,如果你的实例名没有出现在这里,请检查 Listener 和数据库的状态。

Enter the number 0 to go back
Enter your selection:
1
Enter the Oracle database SYSDBA user name:
sys // Oralce DBA 的账号,推荐使用 sys
Enter the Oracle database SYSDBA password:
Re-enter password:
Validating credentials.......
Enter the media server name or IP address: be11d //
这里输入介质服务器的名字
Do you use a recovery catalog? (Y/N):
n // 如果你己经安装好了用做 Recovery Catalog 的实例并做了初始化,就在这里输入实例名和登录账号,如果没有 Recovery Catalog 就选 n RMAN 编录信息将被写入控制文件。

Do you want to use a customized job template? (Y/N):
n // 这里不需要定义作业模板名,因为你在 RMAN 脚本中可以使用 send “NBBSA_JOB_TEMPLATE= 模板名 命令为每个备份指定不同的模板名,当然你要预先在介质服务器端创建好这个模板。

Commit Oracle operation settings to the configuration file? (Y/N):
y
Renamed file /u01/app/oracle/oracle/product/10.2.0/db_1/lib/libobk.so to /u01/app/oracle/oracle/product/10.2.0/db_1/lib/libobk.so.oracle.org
Created symbolic link for /opt/VRTSralus/bin/libobk.so at /u01/app/oracle/oracle/product/10.2.0/db_1/lib/libobk.so //
配置向导在 Oracle 数据库的库文件目录下将 libobk.so 链接到 RALUS 的文件, BE 接管了 RMAN 向磁带机写入数据的备份接口, RMAN sbt sbt_tape 设备写入数据时, RALUS 会把数据传送到介质服务器。

SUCCESS: Successfully added the entry to the configuration file.

Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection:
5

Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection:
3

[root@ora10g lib]#
/etc/init.d/VRTSralus.init start // 配置完成,启动 RALUS
Starting Symantec Backup Exec Remote Agent ......
Starting Symantec Backup Exec Remote Agent: [ OK ]
 
 
 
 
 
##################################################################################
安装代理
安装文档
http://seer.entsupport.symantec.com/docs/282010.htm
配置 agent
 
主要文件为ralus.cfg 这里注意配置格式,需要将media server 改为BE server hostname 或者IP address
1. From the /etc/VRTSralus/ directory, open the RALUS.CFG file using a text editor
2. To add additional media servers, add the following line:
   Software\VERITAS\Backup Exec\Engine\Agents\Agent Directory List <Suffix>= <Media Server Name>
   where <Suffix> is a UNIQUE identifier, 'A', 'B', 'C', '1', '2', '3', and where <Media Server Name> is the name or IP address of the Backup Exec 10.x media server.
 
排错
如果不能够成功在BE 找到Linux 资源,就需要排错。
一般不能够找到资源的问题是Linux 的防火墙(建立关闭)、SElinux 关闭、版本不一至。
配置oracle代理
(1)  关闭代理   agent /etc/init.d/VRTSralus.init stop
(2) cd /opt/VRTSralus/bin
(3) ./AgentConfig开始配置
 
 
备份资源
这里注意账号的选择,系统登陆使用oracle 账号,oracle 资源使用sys 账号。
选择备份资源:
 

测试资源:
 

备份策略:
 

备份成功:
 

恢复成功

恢复资源:
 

 
具体请参照官方文档http://seer.entsupport.symantec.com/docs/310334.htm
 
 
 
Exact Error Message
Final error: 0xe0001402 - This server name is not in the list of authentication credentials on the media server. Enter the server name and its logon account on the media server, and then retry the operation.
Details:
This error occurs when the Oracle server name is not added in Backup Exec. To add the Oracle server name, follow the steps mentioned below:
1. Open the Backup Exec console, then click on Tools > Options > Oracle.
2. Click on the Modify List button as shown in Figure 1. Add the Oracle server name and the logon account name to the media server's list of Oracle servers and authentication credentials using (1) the fully qualified domain name, (2) NetBIOS name and (3) IP address as separate entries, each using the same logon account.
 
 
 
http://esdownload.symantec.com/akdlm/CD/MTV/BEWS_11D.7170_LINUX-UNIX-MAC-NT4_AGENTS.2.tar.gz

  数据库归档方式配置
   1. 正常关闭数据库
   SQL> shutdown
   Database closed.
   Database dismounted.
   ORACLE instance shut down.
   2. 启动数据库到加载状态
   SQL> startup mount
   ORACLE instance started.
   Total System Global Area 285212672 bytes
   Fixed Size 1218992 bytes
   Variable Size 96470608 bytes
   Database Buffers 184549376 bytes
   Redo Buffers 2973696 bytes
   Database mounted.
   3. 修改数据库为归档模式
   SQL> alter database archivelog;
   Database altered.
   4. 查看归档模式是否被修改
   SQL> archive log list
   Database log mode Archive Mode
   Automatic archi ......


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/sbin:/home/sa/app/sa/product/11.2.0/dbhome_1/bin
ORACLE_BASE=/home/sa/app/sa
ORACLE_HOME=/home/sa/app/sa/product/11.2.0/dbhome_1
ORACLE_SID=orcl
ORACLE_UNQNAME=orcl
export PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH ORACLE_UNQNAME
~                                                                               ~                                                                               ~                                   
su - sa
env | grep ORA

    sqlplus "/ as sysdba"
    startup


export ORACLE_UNQNAME=orcl
emctl start dbconsole

启动 db 控制台
从网页进入管理:
https://127.0.0.1:1158/em/console/logon/logon

使用 sys 用户登录
特别注意 Connect as 选项选择 SYSDBA




卸载 oracle
rm -rf $ORACLE_BASE/*
rm -f /etc/oraInst.loc /etc/oratab
rm -rf /etc/oracle
rm -f /etc/inittab.cssd
rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
 
ORA-00119 ORA-00132 的解决方法
 
由于今天修改了测试数据库的 hostname ,造成一下错误:
 
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT=1522))'
 
其实解决起来很简单的,请查看详情。。。。。
 
 
因为修改了主机的 hostname (原来是 orcl ,修改后是 vmware10g ),所以 10g 的实例就没有办法动态注册,那么就没有办法启动了,我的监听配置的也是正确的:
 
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.2)(PORT=1521)))
Services Summary...
 
 
所以呢,当你修改了主机的 hostname 以后,就要相应的修改数据库的初始化参数。
 
-bash-3.00$ sqlplus "/ as sysdba" (先连接上数据库)
 
SQL> create spfile from pfile='/export/home/oracle/1.ora';
 
修改 pfile 里面的 local_listener 如下:
*.job_queue_processes=10
*.local_listener='(ADDRESS_LIST=(Address=(Protocol=tcp) (Host=vmware10g)(Port=1521)))'
*.open_cursors=300
 
SQL> create spfile from pfile='/export/home/oracle/1.ora';
 
 
SQL> startup
ORACLE instance started.
 
Total System Global Area 289406976 bytes
Fixed Size 1279820 bytes
Variable Size 92276916 bytes
Database Buffers 192937984 bytes
Redo Buffers 2912256 bytes
Database mounted.
Database opened.
SQL>