Oracle Learning Rman (v) Mirror copy

Source: Internet
Author: User

We talked about it last time. Rman provides backup of full-database backups, table space backups, data file backups, archive log backups, control files, and parameter files. The files that Rman backs up are called backup sets, and Rman backs up only the data blocks that have been used in the process. Rman packages multiple data files together to generate a backup set. The data file and the backup set file are no longer one by one-corresponding relationships. The concept of backup sets is described in more detail in the next section. Ben will tell us another way to back up Rman--mirror copy.

Mirror copy is a clone of a single data file, control file, archive log. The backed up backup file corresponds to the database file one by one. Describes the difference between a backup set and a mirrored copy

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/70/92/wKiom1W5ucCjfybaAAKWm9l0lRQ706.jpg "title=" Backup set and mirror copy. PNG "alt=" Wkiom1w5uccjfybaaakwm9l0lrq706.jpg "/>

Mirror copy can be generated using Rman's backup as Copy command, or it can be generated using operating system commands.

When backing up with the backup as Copy command, the Oracle server session validates the data block in the data file and logs the backup operation to the control file. We know that if you use the operating system command for hot standby, first to execute the Begin backup command in the database, after executing the command, the data file's head will be frozen, during the backup, in order to ensure the validity of the data block, once the data block is modified, then the log file will record the original image of the data block. You do not need to perform a begin backup if you are backing up using Rman's backup as Copy command. Because Rman checks the data block consistency during the backup process, it is not copied to the backup file until the data block is consistent.

Mirror copy has the following characteristics:

    • Mirror copy can only be written to disk and will take a long time to back up when large files are backed up. However, the time to restore data will be greatly reduced. Because the data file is already on disk, you do not need to restore the data files from other media.

    • Mirror copy contains all the blocks in the data file, regardless of whether the block is used or not.


Performing a mirrored copy

    • Backing Up the database

rman> backup as copy database; starting backup at 2015/07/08 11:53:55using target database control  File instead of recovery catalogallocated channel: ora_disk_1channel ora_ disk_1: sid=39 device type=diskchannel ora_disk_1: starting datafile  Copyinput datafile file number=00001 name=/u01/app/oracle/oradata/devdb/system01.dbfoutput  file name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_system_bss7pnh2_.dbf tag= tag20150708t115355 recid=9 stamp=884519670channel ora_disk_1: datafile copy  complete, elapsed time: 00:00:35channel ora_disk_1: starting datafile  Copyinput datafile file number=00002 name=/u01/app/oracle/oradata/devdb/sysaux01.dbfoutput  file name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_sysaux_bss7qQqg_.dbf tag=tag20150708t115355 recid=10 stamp=884519692channel ora_disk_1: datafile  copy complete, elapsed time: 00:00:25channel ORA_DISK_1: starting  datafile copyinput datafile file number=00005 name=/u01/app/oracle/oradata/devdb/ Example01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_example_ bss7rk3f_.dbf tag=tag20150708t115355 recid=11 stamp=884519708channel ora_disk_1:  Datafile copy complete, elapsed time: 00:00:15channel ora_disk_1: starting  datafile copyinput datafile file number=00003 name=/u01/app/oracle/oradata/ Devdb/undotbs01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_undotbs1 _bss7s07q_.dbf tag=tag20150708t115355 recid=12 stamp=884519715channel ora_disk_1:  Datafile copy complete, elapsed time: 00:00:07channel ora_disk_1: starting datafile copyinput  datafile file number=00006 name=/u01/app/oracle/oradata/devdb/idx01.dbfoutput file  name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_idx_bss7s7gp_.dbf tag=tag20150708t115355  RECID=13 STAMP=884519720channel ORA_DISK_1: datafile copy complete,  elapsed time: 00:00:01channel ora_disk_1: starting datafile copyinput  datafile file number=00004 name=/u01/app/oracle/oradata/devdb/users01.dbfoutput file  name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_users_bss7s8mb_.dbf tag=tag20150708t115355  RECID=14 STAMP=884519720channel ORA_DISK_1: datafile copy complete,  elapsed time: 00:00:01finished backup at 2015/07/08 11:55:21starting  control file and spfile  autobackup at 2015/07/08 11:55:21piece handle=/u01/app/oracle/fast_recovery_area/devdb/ autobackup/2015_07_08/o1_mf_s_884519721_bss7sbdk_.bkp comment=nonefinished control file  And spfile autobackup at 2015/07/08 11:55:22

Backed up all data files in the database (including undo, in fact, Undo is also a data file). However, backup database as copy does not back up the control files and SPFile. The last backup of the control file and the parameter file is because we have configured the control file automatic backup function.

    • Backup table Space

rman> backup as copy tablespace example; starting backup at 2015/07/08 12:26:58using target database control  File instead of recovery catalogallocated channel: ora_disk_1channel ora_ disk_1: sid=1 device type=diskchannel ora_disk_1: starting datafile  copyinput datafile file number=00005 name=/u01/app/oracle/oradata/devdb/ Example01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/devdb/datafile/o1_mf_example_ bss9nmnv_.dbf tag=tag20150708t122659 recid=15 stamp=884521632channel ora_disk_1:  datafile copy complete, elapsed time: 00:00:15finished backup at 2015/ 07/08 12:27:14starting control file and spfile autobackup at 2015/07/ 08 12:27:14piece handle=/u01/app/oracle/fast_recovery_area/devdb/autobackup/2015_07_08/o1_mf_s_884521634_bss9o37t_.bkp comment=nonefinished control file and spfile  autobackup at 2015/07/08 12:27:15
    • Backing up data files

rman> backup as copy datafile  '/u01/app/oracle/oradata/devdb/example01.dbf '; Starting backup at 2015/07/08 12:28:59using channel ora_disk_1channel ora_ disk_1: starting datafile copyinput datafile file number=00005 name=/u01/ app/oracle/oradata/devdb/example01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/devdb/ Datafile/o1_mf_example_bss9rcv9_.dbf tag=tag20150708t122859 recid=16 stamp=884521750channel  ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15Finished  backup at 2015/07/08 12:29:14starting control file and spfile  autobackup at 2015/07/08 12:29:15piece handle=/u01/app/oracle/fast_recovery_area/devdb/ autobackup/2015_07_08/o1_mf_s_884521755_bss9rv8v_.bkp comment=nonefinished control file  And spfile autobackup at&nbSp;2015/07/08 12:29:16 

      Backup control file

rman> backup as copy current controlfile; Starting backup at 2015/07/08 12:33:34using channel ora_disk_1channel ora_ disk_1: starting datafile copycopying current control fileoutput file  name=/u01/app/oracle/fast_recovery_area/devdb/controlfile/o1_mf_tag20150708t123334_bssb0yj4_.ctl tag= tag20150708t123334 recid=17 stamp=884522014channel ora_disk_1: datafile copy  complete, elapsed time: 00:00:01finished backup at 2015/07/08  12:33:35starting control file and spfile autobackup at 2015/07/08  12:33:35piece handle=/u01/app/oracle/fast_recovery_area/devdb/autobackup/2015_07_08/o1_mf_s_884522015_ Bssb0zrf_.bkp comment=nonefinished control file and spfile autobackup at  2015/07/08 12:33:36 
    • Backup archive log file

rman> backup as copy archivelog all; Starting backup at 2015/07/08 12:34:54current log archivedusing channel  ora_disk_1channel ora_disk_1: starting archived log copyinput archived  log thread=1 sequence=16 recid=7 stamp=884486041output file name=/u01/app/ oracle/fast_recovery_area/devdb/archivelog/2015_07_08/o1_mf_1_16_bssb3h9w_.arc recid=15 stamp= 884522095channel ora_disk_1: archived log copy complete, elapsed time:  00:00:01channel ORA_DISK_1: starting archived log copyinput archived  Log thread=1 sequence=17 recid=8 stamp=884486144output file name=/u01/app/oracle /fast_recovery_area/devdb/archivelog/2015_07_08/o1_mf_1_17_bssb3jdy_.arc recid=16 stamp= 884522096channel ora_disk_1: archived log copy complete, Elapsed time: 00:00:01channel ora_disk_1: starting archived log copyinput  archived log thread=1 sequence=18 RECID=9 STAMP=884486148output file  Name=/u01/app/oracle/fast_recovery_area/devdb/archivelog/2015_07_08/o1_mf_1_18_bssb3khz_.arc recid=17  stamp=884522097channel ora_disk_1: archived log copy complete, elapsed  time: 00:00:01channel ORA_DISK_1: starting archived log copyinput  Archived log thread=1 sequence=19 recid=10 stamp=884486151output file name= /u01/app/oracle/fast_recovery_area/devdb/archivelog/2015_07_08/o1_mf_1_19_bssb3ll4_.arc recid=18  Stamp=884522098channel ora_disk_1: archived log copy complete, elapsed time :  00:00:01channel ora_disk_1: starting archived log copyinput archived  log thread=1 sequence=20 recid=11 stamp=884486169output file name=/u01/app/oracle/fast_recovery_area/ Devdb/archivelog/2015_07_08/o1_mf_1_20_bssb3mnx_.arc recid=19 stamp=884522099channel ora_disk_1 :  archived log copy complete, elapsed time: 00:00:01channel ora_disk_1 :  starting archived log copyinput archived log thread=1 sequence=21  recid=12 stamp=884486468output file name=/u01/app/oracle/fast_recovery_area/devdb/ Archivelog/2015_07_08/o1_mf_1_21_bssb3nqm_.arc recid=20 stamp=884522100channel ora_disk_1:  archived log copy complete, elapsed time: 00:00:01channel ora_disk_1:  starting archived log copyinput archived log thread=1 sequence=22  recid=13 stamp=884486525output file name=/u01/app/oracle/fast_recovery_area/devdb/ Archivelog/2015_07_08/o1_mf_1_22_bssb3otp_.arc recid=21 stamp=884522101channel ora_disk_1: archived log copy  Complete, elapsed time: 00:00:01channel ora_disk_1: starting archived log  copyinput archived log thread=1 sequence=23 recid=14 stamp=884522094output  file name=/u01/app/oracle/fast_recovery_area/devdb/archivelog/2015_07_08/o1_mf_1_23_bssb3py8_.arc  recid=22 stamp=884522103channel ora_disk_1: archived log copy complete,  elapsed time: 00:00:01Finished backup at 2015/07/08 12:35:03Starting  control file and spfile autobackup at 2015/07/08 12:35:04piece handle= /u01/app/oracle/fast_recovery_area/devdb/autobackup/2015_07_08/o1_mf_s_884522104_bssb3r69_.bkp comment= Nonefinished control file and spfile autobackup at 2015/07/08 12:35:05


This article is from the "Ding Dong" blog, please be sure to keep this source http://lqding.blog.51cto.com/9123978/1680129

Oracle Learning Rman (v) Mirror copy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.