揭祕ORACLE備份之----RMAN之一(引數配置)
RMAN配置引數說明
[oracle@rhel5 admin]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Sep 5 03:49:25 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: WAILON (DBID=2747751647)
--檢視RMAN所有配置資訊
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/flash_recovery_area/%F.bkp';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
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 ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_wailon.f'; # default
RMAN> --控制檔案是否自動備份
RMAN> show controlfile autobackup;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> configure controlfile autobackup off;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored
RMAN> show controlfile autobackup;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN> --使用clear恢復預設設定
RMAN> configure controlfile autobackup clear;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN configuration parameters are successfully reset to default value
RMAN> show controlfile autobackup;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
RMAN> --配置控制檔案自動備份位置,否則有可能儲存到$ORACLE_HOME/dbs或flash recovery area
RMAN> configure controlfile autobackup format for device type disk to '/u01/app/flash_recovery_area/%F.bkp';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/flash_recovery_area/%F.bkp';
new RMAN configuration parameters are successfully stored
rman備份片格式:
格式 說明
%a 資料庫活動id
%c 備份片拷貝數
%d 庫名
%D 天(DD)
%e 歸檔序列號
%F c-iiiiiiiiii-YYYYMMDD-QQ ,iiiiiiiiii是資料庫id號,QQ是1-256的序列
%I dbid
%p 備份集中的備份片號
%s 備份集號
%t 時間戳
%T YYYYMMDD
%u 8符表示的備份集建立時間(此值唯一)
%U %u_%p_%c
RMAN> --配置備份型別為copy
RMAN> configure device type disk backup type to copy;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY PARALLELISM 1;
new RMAN configuration parameters are successfully stored
RMAN> show device type;
RMAN configuration parameters for database with db_unique_name RAC are:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY PARALLELISM 1;
RMAN> show default device type;
RMAN configuration parameters for database with db_unique_name RAC are:
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
RMAN> --配置備份型別為backupset
RMAN> configure device type disk backup type to compressed backupset;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY PARALLELISM 1;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
new RMAN configuration parameters are successfully stored
RMAN> show device type;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name WAILON are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
RMAN> --配置備份channel
RMAN> configure channel 1 device type disk format '/u01/app/flash_recovery_area/%U.bkp';
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/u01/app/flash_recovery_area/%U.bkp';
new RMAN configuration parameters are successfully stored
RMAN> show channel;
RMAN configuration parameters for database with db_unique_name WAILON are:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/u01/app/flash_recovery_area/%U.bkp';
RMAN> --配置備份保留策略,保留7天內的備份資訊
RMAN> configure retention policy to recovery window of 7 days;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored
RMAN> show retention policy;
RMAN configuration parameters for database with db_unique_name WAILON are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN> --配置每個備份檔案最多保留2份
RMAN> configure retention policy to redundancy 2;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters are successfully stored
RMAN> show retention policy;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
RMAN> --顯示過期備份檔案
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 1 13-JUN-13
Backup Piece 1 13-JUN-13 /u01/app/flash_recovery_area/WAILON/autobackup/2013_06_13/o1_mf_s_817975331_8vl0o6lb_.bkp
RMAN> --配置備份保留策略為NONE
RMAN> configure retention policy to none;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO NONE;
new RMAN configuration parameters are successfully stored
RMAN> report obsolete;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 09/05/2013 04:04:10
RMAN-06525: RMAN retention policy is set to none
RMAN> --配置歸檔檔案刪除策略,standby應用後刪除
RMAN> configure archivelog deletion policy to applied on standby;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archivelog deletion policy
RMAN> show archivelog deletion policy;
RMAN configuration parameters are:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
RMAN> --清除歸檔檔案刪除策略配置
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY clear;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
RMAN configuration parameters are successfully reset to default value
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO NONE;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/flash_recovery_area/%F.bkp';
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/u01/app/flash_recovery_area/%U.bkp';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_wailon.f'; # default
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/429786/viewspace-776763/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 揭祕ORACLE備份之----RMAN之二(備份方式)Oracle
- 揭祕ORACLE備份之----RMAN之五(CATALOG)Oracle
- 揭祕ORACLE備份之----RMAN之四(塊跟蹤)Oracle
- 揭祕ORACLE備份之--邏輯備份(EXP)Oracle
- 揭祕ORACLE備份之--邏輯備份(EXPDP)Oracle
- 揭祕ORACLE備份之--冷備份(也叫離線備份)Oracle
- 揭祕ORACLE備份之--熱備份(也叫聯機備份)Oracle
- oracle之rman備份Oracle
- Oracle的RMAN備份恢復繼續,RMAN部分引數Oracle
- Oracle rman 配置引數Oracle
- Oracle備份之RMAN工具(四)Oracle
- Oracle備份之RMAN工具(三)Oracle
- Oracle備份之RMAN工具(二)Oracle
- Oracle備份之RMAN工具(一)Oracle
- ORACLE RMAN備份的指令碼配置Oracle指令碼
- 冷備份之一查詢引數檔案及備份引數檔案
- oracle RMAN引數配置詳解Oracle
- 揭秘ORACLE備份之----RMAN之五(CATALOG)Oracle
- 探索ORACLE之RMAN_05備份策略Oracle
- Oracle RMAN 增量備份Oracle
- oracle rman備份命令Oracle
- 【轉】Oracle rman備份Oracle
- Oracle 備份恢復篇之RMAN catalogOracle
- Oracle 11g RMAN備份-增量備份Oracle
- Oracle RMAN備份實戰Oracle
- Oracle OCP(60):RMAN 備份Oracle
- oracle RMAN備份指令碼Oracle指令碼
- RMAN備份與恢復之加密備份加密
- linux 配置nfs(rman 備份)LinuxNFS
- ORACLE rman備份之ORA-00230Oracle
- Oracle資料庫備份與恢復之RMANOracle資料庫
- Oracle資料庫RMAN小結之備份部分Oracle資料庫
- Oracle 11g RMAN備份-備份標籤Oracle
- RMAN筆記之備份集和備份片筆記
- [Oracle] rman備份指令碼(2)Oracle指令碼
- ORACLE RMAN備份及還原Oracle
- oracle rman備份指令碼收集Oracle指令碼
- Oracle裡邏輯備份、物理備份、Rman備份的區別Oracle