In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
We mentioned last time that RMAN can provide full library backup, tablespace backup, data file backup, archive log backup, control file and parameter file backup. The files backed up by RMAN are called backup sets. In the process of backup, RMAN only backs up the data blocks that have been used. RMAN packages multiple data files together to generate a backup set. There is no longer an one-to-one correspondence between data files and backup set files. With regard to the concept of backup sets, we will introduce them in more detail in the next lesson. This will tell us about another backup method of RMAN-mirrored copy.
A mirror copy is a clone of a single data file, control file, and archive log. The backup files correspond to the database files one by one. The following figure describes the difference between a backup set and a mirror copy
The mirror copy can be generated using either the RMAN backup as copy command or the operating system command.
When backing up using the backup as copy command, the Oracle server session validates the blocks in the data file and logs the backup operation to the control file. We know that if you use operating system commands for hot backup, you must first execute the begin backup command in the database. After executing the command, the header of the data file 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 mirror of the data block. "if you use the backup as copy command of RMAN for backup, you do not need to perform begin backup." Because rman checks the consistency of the data block during the backup process, it does not copy it 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 it will take a long time when backing up large files. However, the time for data recovery will be greatly reduced. Because the data file is already on disk, there is no need to restore the data file from other media.
Mirrored copy contains all blocks in the data file, regardless of whether the block is used or not.
Execute Mirror copy
Backup 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_bss7pnh3_.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
Back up all the data files in the database (including undo, but undo is also a data file). However, when you backup database as copy, the control files and spfile are not backed up. The last section of backup control files and parameter files is because we have configured the automatic backup function of control files.
Backup tablespace
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
Backup data files
RMAN > backup as copy datafile'/ u01qqappplicoracleUnixoradataUniple01.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 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
Back up archive log files
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
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.