ORACLE之rman备份加密(五)
1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/10.2/db_1/dbs/snapcf_orcl.f'; # default
RMAN> configure encryption for database on;
新的 RMAN 配置参数:
CONFIGURE ENCRYPTION FOR DATABASE ON;
已成功存储新的 RMAN 配置参数
RMAN> backup datafile 6;
启动 backup 于 28-3月 -13
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集内的数据文件
输入数据文件: 文件号=00006 名称=/opt/oracle/oradata/sysaux_add.dbf
通道 ORA_DISK_1: 正在启动段 1 于 28-3月 -13
通道 ORA_DISK_1: 已完成段 1 于 28-3月 -13
段句柄=/opt/oracle/flash_recovery_area/ORCL/backupset/2013_03_28/o1_mf_nnndf_TAG20130328T204900_8o8h2dly_.bkp 标记=TAG20130328T204900 注释=NONE
通道 ORA_DISK_1: 备份集已完成, 经过时间:00:00:26
完成 backup 于 28-3月 -13
RMAN> exit
恢复管理器完成。
oracle@oracle:~/oradata> exit
logout
oracle:~ # su - oracle
sqlplus "/as sysdoracle@oracle:~> sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:50:01 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@orcl#alter system set encryption wallet close;
系统已更改。
SYS@orcl#exit
从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
oracle@oracle:~> rman target /
恢复管理器: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:50:30 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到目标数据库: ORCL (DBID=1307032085)
RMAN>
RMAN> host;
oracle@oracle:~> ls
admin cfgtoollogs flash_recovery_area oradata pfile.ora xiaohai
arch_log Desktop install2013-03-21_00-47-48.log oradata_test product xiaohai.sql
bak diag orabak ORCL01 redo_bak
block_tracking.log Documents ora_bak_test pfile.bak test
oracle@oracle:~> cd oradata
oracle@oracle:~/oradata> ls
ORCL ORCL01 sysaux_add.dbf sysaux_add.dbf_bak system_add.dbf system_add.dbf_bak
oracle@oracle:~/oradata> rm sysaux_add.dbf
oracle@oracle:~/oradata> exit
exit
主机命令完成
RMAN> exit
恢复管理器完成。
oracle@oracle:~> exit
logout
oracle:~ # su - oracle
soracle@oracle:~> sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 3月 28 20:51:01 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@orcl#
SYS@orcl#shutdown abort;(这个是模拟极端恢复了,在恢复数据的时候需要进行实例恢复)
ORACLE 例程已经关闭。
SYS@orcl#startup mount;
ORACLE 例程已经启动。
Total System Global Area 805875712 bytes
Fixed Size 2148720 bytes
Variable Size 553649808 bytes
Database Buffers 243269632 bytes
Redo Buffers 6807552 bytes
数据库装载完毕。
SYS@orcl#!
oracle@oracle:~> rman targ