安装和配置 Oracle 安全备份 10.2
目的
本教程将向您介绍如何安装和配置 Oracle 安全备份 (OSB) 10.2,以用于测试和培训目的(不用于生产)。完成本教程后才可学习所有其他 Oracle 安全备份 10.2 教程。
所需时间
大约 1 个小时
主题
本教程包括下列主题:
查看屏幕截图
将鼠标置于此图标上以加载和查看本教程的所有屏幕截图。(警告:因为此操作会同时加载所有屏幕截图,所以网速较慢时,响应时间可能会比较长。)
注:此外,您还可以在下列步骤中将鼠标放在每个单独的图标上,从而仅加载和查看与该步骤相关的屏幕截图。
概述
本教程介绍如何安装 Oracle 安全备份以及如何配置它以与 RMAN 无缝集成。您将使用不同的界面以熟悉它们。
完成本教程后才可学习所有其他 Oracle 安全备份 10.2 教程。
前提条件
开始本教程之前,您应该:
1. | 可以访问或已经使用 Oracle 企业管理器数据库控制台在 Linux 32 上安装了 Oracle 数据库 11g。— 在数据库安装过程中,您需要知道 Oracle 用户 SYS 的口令(称为 SYS_password)和 OS 用户帐户 oracle 的口令(称为 host_password)。 |
2. | 确保数据库在 listener.ora 文件中有一个静态项。(您可以使用 netmgr 实用程序完成这一工作。) |
3. | 可以访问或已经安装了示例模式。 |
4. | 可以访问 Oracle 安全备份 10.2 软件。可以从以下链接 下载该软件。 本教程假定该软件下载到 /stage 目录中,并在该目录中完成解压缩。还假定 root 用户拥有 /u01 目录,目录中有足够的空间来存储您在这些教程中创建的所有备份。 要安装该软件,您需要知道 root 用户的口令。 本教程已经在 Oracle 安全备份 v10.2.0.2 Linux x86(32 位版)上经过测试。
|
5. | 将 文件下载到您的工作目录(\home\oracle)中,并解压缩该文件。 |
安装 Oracle 安全备份软件
在本主题中,您将安装解压缩的分段 Oracle 安全备份软件。
要安装 Oracle 安全备份软件,执行以下步骤:
Welcome to Oracle's setup program for Oracle Secure Backup. This program loads Oracle Secure Backup software from the CD-ROM to a filesystem directory of your choosing.
This CD-ROM contains Oracle Secure Backup version 10.2.0.2.0_linux32.
Please wait a moment while I learn about this host... done.
- - - - - - - - - - - - - - - - - - - - - - - - - - - 1. linux32 administrative server, media server, client
- - - - - - - - - - - - - - - - - - - - - - - - - - - Loading Oracle Secure Backup installation tools... done. Using your previous obparameters file. The new file shipped with this distribution of Oracle Secure Backup is called install/obparameters.new. Loading linux32 administrative server, media server, client... done.
- - - - - - - - - - - - - - - - - - - - - - - - - - - Loading of Oracle Secure Backup software from CD-ROM is complete. You may unmount and remove the CD-ROM.
Would you like to continue Oracle Secure Backup installation with 'installob' now? (The Oracle Secure Backup Installation Guide contains complete information about installob.) Please answer 'yes' or 'no' [yes]:
Please answer 'yes' or 'no' [yes]: yes
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Welcome to installob, Oracle Secure Backup's UNIX installation program.
It installs Oracle Secure Backup onto one or more UNIX or Linux systems on your network. (Install Oracle Secure Backup for Windows using the CD-ROM from which you loaded this software.)
For most questions, a default answer appears enclosed in square brackets. Press Enter to select this answer.
Please wait a few seconds while I learn about this machine... done.
Have you already reviewed and customized install/obparameters for your Oracle Secure Backup installation [yes]?
Have you already reviewed and customized install/obparameters for your Oracle Secure Backup installation [yes]? no Would you like to do this now [yes]?
Would you like to do this now [yes]? no
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Oracle Secure Backup is not yet installed on this machine.
Oracle Secure Backup's Web server has been loaded, but is not yet configured.
You can install this host one of three ways: (a) administrative server (the host will also be able to act as a media server or client) (b) media server (the host will also be able to act as a client) (c) client
If you are not sure which way to install, please refer to the Oracle Secure Backup Installation Guide. (a,b or c) [a]?
If you are not sure which way to install, please refer to the Oracle Secure Backup Installation Guide. (a,b or c) [a]? a
Beginning the installation. This will take just a minute and will produce several lines of informational output.
Installing Oracle Secure Backup on edrsr4p1 (Linux version 2.6.9-55.0.0.0.2.ELsmp)
You must now enter a password for the Oracle Secure Backup encryption key store. Oracle suggests you choose a password of at least 8 characters in length, containing a mixture of alphabetic and numeric characters.
Please enter the key store password:
Please enter the key store password: keystore_password
Re-type password for verification: keystore_password You must now enter a password for the Oracle Secure Backup 'admin' user.
Oracle suggests you choose a password of at least 8 characters in length,
containing a mixture of alphabetic and numeric characters.
Please enter the admin password:
Please enter the admin password: admin_password Re-type password for verification: admin_password You should now enter an email address for the Oracle Secure Backup 'admin'
user. Oracle Secure Backup uses this email address to send job summary
reports and to notify the user when a job requires input. If you leave this
blank, you can set it later using the obtool's 'chuser' command.
Please enter the admin email address:
generating links for admin installation with Web server updating /etc/ld.so.conf checking Oracle Secure Backup's configuration file (/etc/obconfig) setting Oracle Secure Backup directory to /usr/local/oracle/backup in /etc/obconfig setting local database directory to /usr/etc/ob in /etc/obconfig setting temp directory to /usr/tmp in /etc/obconfig setting administrative directory to /usr/local/oracle/backup/admin in /etc/obconfig protecting the Oracle Secure Backup directory creating /etc/rc.d/init.d/observiced activating observiced via chkconfig initializing the administrative domain
****************************** N O T E ****************************** On Linux systems Oracle recommends that you answer no to the next two questions. The preferred mode of operation on Linux systems is to use the /dev/sg devices for attach points as described in the 'ReadMe' and in the 'Installation and Configuration Guide'.
Is host01 connected to any tape libraries that you'd like to use with Oracle Secure Backup [no]?
Is host01 connected to any tape libraries that you'd like to use with Oracle Secure Backup [no]? no
Is host01 connected to any tape drives that you'd like to use with Oracle Secure Backup [no]? no
Installation summary:
Installation Host OS Driver OS Move Reboot Mode Name Name Installed? Required? Required? admin host01 Linux no no no
Oracle Secure Backup is now ready for your use.
#
# exit $
配置 Oracle 安全备份
本主题将指导您完成一次性的配置任务,并确认磁带库和磁带驱动器等基本元素正常工作。
要配置 Oracle 安全备份并确认您的配置,执行以下步骤:
config1_in.sh config1_out.sh config1.sh config2.txt
host01.example.com
Password: admin_password Password: admin_password Password: admin_password Password: admin_password Password: admin_password Password: admin_password Password: admin_password Password: admin_password Password: admin_password
$ su - root Password: root_password # cd /u01 # rm -rf vli* # rm -rf vd* #
$ obtool
Oracle Secure Backup 10.2.0.2.0 login: admin Password: admin_password ob>
ob> lshost host01.example.com admin,mediaserver,client (via OB) in service ob>
ob> lsdev
library vlib in service drive 1 vdte1 in service drive 2 vdte2 in service drive 3 vdte3 in service drive 4 vdte4 in service library vlib2 in service drive 1 vdrive1 in service drive 2 vdrive2 in service ob>
ob> < /home/oracle/config2.txt ob> # Only for test and training, not for production ob> # OSB script, run as admin user ob> ob> insertvol -L vlib -c 250 unlabeled 1-32 ob> insertvol -L vlib2 -c 250 unlabeled 1-14ob> ob>
OSB-CATALOG-MF: Write window: 7 days Keep volume set: 14 days Appendable: yes Volume ID used: unique to this media family Comment: OSB catalog backup media family RMAN-DEFAULT: Keep volume set: content manages reuse Appendable: yes Volume ID used: unique to this media family Comment: Default RMAN backup media family
ob>
向企业管理器注册您的管理服务器
在本主题中,您将向企业管理器 (EM) 注册您的 Oracle 安全备份管理服务器,这是在这两个工具间实现顺畅操作所必需的。要注册您的管理服务器,执行以下步骤:
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0 Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved. https://host01.example.com:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/host01.example.com_orcl/sysman/log
在企业管理器中测试连接性
在本主题中,您首先在企业管理器中查看先前创建的虚拟设备,然后测试其连接性以确认它们可用且准备完毕。要查看您的设备并测试您设备的连接性,执行以下步骤:
1. | 在 Oracle Secure Backup Device and Media:Administrative Server 页面上,从 Devices 部分的 View 下拉列表中选择 All Devices。 |
2. | 您的库设备将显示在 Devices 部分中。
|
3. | 单击 Name 列中的每个加号图标以展开库。 将显示您所有的设备。 |
4. | 要测试您的设备,单击 Oracle Secure Backup Device and Media: Administrative Server 页面的 Resources 部分中 Devices 的 Manage 链接。 |
5. | 在 Devices 页面上,从 Actions 下拉列表中选择 Verify Connectivity。 |
6. | 在 Devices 页面上,选择 vlib 库,并单击 Actions 下拉列表后的 Go 按钮。 |
7. | 您应当会收到类似以下所示的成功消息。 |
8. | 要确认 vlib2 库的连接性,选择该库并单击 Verify Connectivity Actions 后的 Go 按钮。 |
9. | 您应当会收到类似以下所示的成功消息。 |
10. | 单击 Database 选项卡,准备下一个任务。 |
定义新的 OSB 用户并对其进行预授权
在本主题中,您将 oracle OS 用户定义为新的 Oracle 安全备份管理员,并预先对其进行授权,由其执行 RMAN 备份和恢复作业。“预授权”意味着这一用户登录企业管理器并(举例来说)启动备份到磁带的作业后,不需要提供 OSB 证书。要定义新的 OSB 用户并对其进行预授权,执行以下步骤:
1. | 在企业管理器的 Availability 页面上,右键单击 Oracle Secure Backup 部分中的 File System Backup and Restore,并选择(如果您的浏览器中提供)Open Link in a New Tab。
|
2. | 在 Oracle Secure Backup Login 页面上,输入 admin 作为 User Name,并输入您的 admin_password,然后单击 Login。
|
3. | 在 OSB Home 页面上,单击 Configure 选项卡。 |
4. | 在 Configure 页面上,单击 Basic 部分中的 Users。 |
5. | 在 Configure:Users 页面中,单击 Add 按钮。 |
6. | 在 Configure:Users > New Users 页面上,输入或选择以下值,然后单击 Apply: User:oraclePassword:host_password User class:oracle UNIX name:oracle UNIX group:dba NDMP server user:no 您将收到一条成功消息。
|
7. | 在 Configure:Users > oracle 页面上,单击 Preauthorized Access。 |
8. | 在 Configure:Users > oracle > Preauthorized Access 页面上,输入或选择以下值,然后单击 Add: Hosts:all hostsOS username:* Windows domain name:* Attributes: rman |
9. | 您应当会收到类似以下所示的成功消息: |
10. | 单击 Logout。 |
准备用于备份的数据库
下两个主题紧密相关。二者都是数据库准备中所必需的。本 OBE 展示了企业管理器界面中的任务(您也可以选择其他界面,如 SQL*Plus)。
为在企业管理器中启用 ARCHIVELOG 模式,执行以下步骤:
1. | 在您的 Web 浏览器中,在 Enterprise Manager Login 页面上,输入 SYS 作为 User Name,输入您的 SYS_password,并选择 Connect As SYSDBA。然后单击 Login。(要了解详细的说明,参见向企业管理器注册您的管理服务器中的步骤 1、2 和 3。) |
2. | 在 EM Home 页面上,单击 Availability 选项卡。
|
3. | 在 Availability 页面上,单击 Backup/Recovery 部分中的 Recovery Settings。 |
4. | 在 Recovery Settings 页面上,选择 Media Recovery 部分中的 ARCHIVELOG Mode,然后单击 Apply。 |
5. | 在 Confirmation 页面上,单击 Yes 重启数据库。 |
要在企业管理器中重启数据库,执行以下步骤:
1. | 在 Restart Database:Specify Host and Target Database Credentials 页面上,输入并确认以下值,然后单击 OK: 对于 Host Credentials 对于 Database Credentials: |
2. | 在 Restart Database:Confirmation 页面上,单击 Yes。
|
3. | 如果您刷新或重新查询时代理连接断开,您可能收到下面的错误。该错误将自动自行解决。单击 OK。 Restart Database:Activity Information 页面将及时显示。 单击 Refresh 直至 EM Home 页面显示。 注:如果 Enterprise Manager Login 页面显示,输入 SYS 作为 User Name,输入您的 SYS_password 并选择 Connect As SYSDBA。然后单击 Login。 |
4. | 确认数据库正常运行。 |
创建一个新的媒体系列
在本主题中,您要查看默认的媒体系列,并使用 OSB Web 工具创建新的媒体系列。要查看和创建媒体系列,执行以下步骤:
1. | 要直接(而不是从 EM)启动 OSB Web 工具,打开您的 web 浏览器,按以下格式输入您的 URL: https://<主机>/index.php Oracle 安全备份 Web 界面显示 Oracle Secure Backup Login 页面,并将 URL 更改如下: |
2. | 在 Oracle Secure Backup Login 页面上,输入 admin 作为 User Name,并输入您的 admin_password,然后单击 Login。
|
3. | 在 OSB Home 页面上,单击右上角的 Preferences。 |
4. | 针对 Extended command output 选择 On 设置,然后单击 Apply。 当您单击 Apply 时,页面不会改变。您可以在后面的第 7 步看到此更改的结果。
|
5. | 要查看和编辑现有的媒体系列以及创建新的媒体系列,单击 Configure 选项卡。 |
6. | 单击 Media Families。 |
7. | 在 Configure:Media Families 页面上,首先查看现有的默认媒体系列,然后单击 Add 按钮创建新的媒体系列。
|
8. | 在 Configure:Media Families > New Media Families 页面上,输入和确认以下值,然后单击 Apply: Media Family:OFFSITE_7YVolume ID used:Unique to this media family Volume expiration:Time Managed Keep volume set:7 years Appendable:yes Comment:Store for 7 years offsite - for compliance with XYZ law. 您将收到一条成功消息。 |
9. | 滚动至 Configure:Media Families > OFFSITE_7Y 页面的底部,查看 Extended Command Output。 然后单击 OK 按钮。 |
10. | Configure:Media Families 页面将显示,其中包括您新创建的 OFFSITE_7Y 媒体系列。 |
11. | 在 Configure:Media Families 页面上,单击 Add 按钮创建其他媒体系列。 |
12. | 在 Configure:Media Families > New Media Families 页面上,输入和确认以下值,然后单击 Apply: Media Family:offsite_testVolume ID used:Unique to this media family Volume expiration:Time Managed Keep volume set:10 minutes Appendable:yes Comment:Edit test values later. |
13. | 您将收到一条成功消息。单击 OK。 |
14. | 在 Configure:Media Families 页面上,查看所有可用的媒体系列,默认的媒体系列和您新创建的媒体系列。 |
创建一个数据库存储选择器
作为最后一项配置任务,您要测试磁带备份,并在企业管理器中创建一个数据库存储选择器。
要创建存储选择器并测试磁带备份,执行以下步骤:
1. | 在您的 Web 浏览器中,在 Enterprise Manager Login 页面上,输入 SYS 作为 User Name,输入您的 SYS_password,并选择 Connect As SYSDBA。然后单击 Login。(要了解详细的说明,参见向企业管理器注册您的管理服务器中的步骤 1、2 和 3。) |
2. | 在企业管理器中,浏览至 Availabity > Backup Settings(在 Backup/Recovery Setup 部分中)。
|
3. | 要提供和保存磁带设置,输入以下值,然后单击 OK: Tape Drives:1 |
4. | 要创建数据库存储选择器,重新进入 Backup Settings 页面,然后单击 Backup Settings Device 页面上 Oracle Secure Backup 部分中的 Configure。 |
5. | 在 Administrative Server Login 页面上,输入或确认以下值,然后单击 OK: Administrative Server:Your_host |
6. | 在 Backup Storage Selectors 页面上,单击 Add。 |
7. | 在 Add Backup Storage Selector 页面上,选择以下值,然后单击 OK: Database Backup Types:Archive Logs、Auto Backup、Full 和 Incremental |
8. | 您应当在 Backup Storage Selectors 页面上收到一条成功消息。单击 Return。 |
9. | 在 Backup Settings Device 页面上,输入或确认以下值,然后单击 Test Tape Backup: Tape Drives:1 根据您的系统资源的情况,Processing: Test Tape Backup 页面将显示一段时间。 |
10. | 在 Backup Settings Device 页面上,查看成功消息,然后注销。 |
总结
在本教程中,您学习了如何:
安装 Oracle 安全备份软件 | |
配置 Oracle 安全备份 | |
向企业管理器注册您的管理服务器 | |
在企业管理器中测试连接性 | |
定义新的 OSB 用户并对其进行预授权 | |
准备用于备份的数据库 | |
创建一个新的媒体系列 | |
创建一个数据库存储选择器 |
相关信息
要了解有关 Oracle 安全备份的更多信息,可以参考:
Oracle 技术网 (OTN) 网站上的 Oracle 安全备份 10.2 | |
OTN 网站上的其他 OBE | |
演示材料 (viewlet) |
将鼠标置于该图标上可以隐藏所有的屏幕截图。