最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

OCM_Session3_2_UsingRMAN

来源:动视网 责编:小采 时间:2020-11-09 15:13:46
文档

OCM_Session3_2_UsingRMAN

OCM_Session3_2_UsingRMAN:2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups
推荐度:
导读OCM_Session3_2_UsingRMAN:2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups


2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups

2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups to write to /home/oracle/backup/control (you may have to create this directory) 2.1.4 Configure a retention window of 7 days.
首先创建两个文件夹 [oracle@ocm1 ~]$ mkdir /home/oracle/backup [oracle@ocm1 ~]$ mkdir /home/oracle/backup/control
按以下操作: 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 '%F'; # default 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; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_PROD.f'; # default
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters: CONFIGURE BACKUP OPTIMIZATION ON; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak';
new RMAN configuration parameters: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak'; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl';
new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl'; new RMAN configuration parameters are successfully stored
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 all;
RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl'; 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 CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak'; 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_PROD.f'; # default
RMAN>


2.2 Perform a backup 2.2.1 Perform a backup using your default channel with compression 2.2.2 Include all datafiles in the backup 2.2.3 Include your current control file and spfile 2.2.4 Include all archive logs, then remove the originals. 备份,使用缺省通道,压缩备份,包括所有文件,包括当前的控制文件的spfile文件,包括所有的归档日志,并将原来的归档日志移除。
RMAN> backup as compressed backupset database include current controlfile plus archivelog delete all input;

Starting backup at 21-MAR-14 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=268 devtype=DISK skipping archive log file /u01/app/oracle/oradata/PROD/Disk2/arch/1_6_842523531.dbf; already backed up 1 time(s) skipping archive log file /u01/app/oracle/oradata/PROD/Disk2/arch/1_7_842523531.dbf; already backed up 1 time(s) channel ORA_DISK_1: starting compressed archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=8 recid=3 stamp=842717159 input archive log thread=1 sequence=9 recid=4 stamp=842790340 input archive log thread=1 sequence=10 recid=5 stamp=842796122 channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_06p3o334_1_1.bak tag=TAG20140321T140208 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:17 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_8_842523531.dbf recid=3 stamp=842717159 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_9_842523531.dbf recid=4 stamp=842790340 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_10_842523531.dbf recid=5 stamp=842796122 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_6_842523531.dbf recid=1 stamp=842627911 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_7_842523531.dbf recid=2 stamp=8424301 Finished backup at 21-MAR-14
Starting backup at 21-MAR-14 using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00004 name=/u01/app/oracle/oradata/PROD/Disk1/example01.dbf input datafile fno=00001 name=/u01/app/oracle/oradata/PROD/Disk1/system01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/PROD/Disk1/sysaux01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/PROD/Disk1/undotbs01.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/PROD/Disk1/users01.dbf input datafile fno=00008 name=/u01/app/oracle/oradata/PROD/Disk1/oltp01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/PROD/Disk1/indx01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/PROD/Disk1/tools01.dbf channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_07p3o33u_1_1.bak tag=TAG20140321T140235 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:03:39 channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset including current control file in backupset channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_08p3o3aq_1_1.bak tag=TAG20140321T140235 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 21-MAR-14
Starting backup at 21-MAR-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=11 recid=6 stamp=842796380 channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_09p3o3av_1_1.bak tag=TAG20140321T140620 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_11_842523531.dbf recid=6 stamp=842796380 Finished backup at 21-MAR-14
Starting Control File and SPFILE Autobackup at 21-MAR-14 piece handle=/home/oracle/backup/control/PROD_c-254361867-20140321-00.ctl comment=NONE Finished Control File and SPFILE Autobackup at 21-MAR-14
RMAN>

文档

OCM_Session3_2_UsingRMAN

OCM_Session3_2_UsingRMAN:2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups
推荐度:
标签: com r session
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top