免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1592 | 回复: 0

[Hive] backup database plus archivelog; 命令 [复制链接]

论坛徽章:
0
发表于 2011-12-20 09:48 |显示全部楼层
<DIV>
<DIV>RMAN&gt; backup database plus archivelog;命令的理解!</DIV>
<DIV>&nbsp;</DIV>
<DIV>个人理解如下:</DIV>
<DIV>执行命令后系统 </DIV>
<DIV>切换redo log并归档</DIV>
<DIV>备份归档文件(scn:604010~609123)</DIV>
<DIV>备份数据文件(ckp scn:609130/609129)</DIV>
<DIV>切换redo log并归档</DIV>
<DIV>备份归档文件(scn:609123~609152)</DIV>
<DIV>备份spfile和control file(ckp scn:609158)</DIV>
<DIV>&nbsp;</DIV>
<DIV>具体操作如下:</DIV>
<DIV>RMAN&gt; backup database plus archivelog;</DIV>
<DIV>Starting backup at 30-JUL-09</DIV>
<DIV>current log archived&nbsp; //命令开始,切换redo log并归档!</DIV>
<DIV>using channel ORA_DISK_1</DIV>
<DIV>using channel ORA_DISK_2</DIV>
<DIV>channel ORA_DISK_1: starting archive log backupset</DIV>
<DIV>channel ORA_DISK_1: specifying archive log(s) in backup set</DIV>
<DIV>input archive log thread=1 sequence=7 recid=43 stamp=693543239</DIV>
<DIV>channel ORA_DISK_1: starting piece 1 at 30-JUL-09</DIV>
<DIV>channel ORA_DISK_1: finished piece 1 at 30-JUL-09</DIV>
<DIV>--开始备份归档日志(scn:604010~609123)</DIV>
<DIV>piece handle=/opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_annnn_TAG20090730T025359_5716pgom_.bkp tag=TAG20090730T025359 comment=NONE</DIV>
<DIV>channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05</DIV>
<DIV>Finished backup at 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>Starting backup at 30-JUL-09</DIV>
<DIV>using channel ORA_DISK_1</DIV>
<DIV>using channel ORA_DISK_2</DIV>
<DIV>channel ORA_DISK_1: starting full datafile backupset</DIV>
<DIV>channel ORA_DISK_1: specifying datafile(s) in backupset</DIV>
<DIV>input datafile fno=00001 name=/opt/oracle/oradata/boy/system01.dbf</DIV>
<DIV>input datafile fno=00004 name=/opt/oracle/oradata/boy/users01.dbf</DIV>
<DIV>channel ORA_DISK_1: starting piece 1 at 30-JUL-09</DIV>
<DIV>channel ORA_DISK_2: starting full datafile backupset</DIV>
<DIV>channel ORA_DISK_2: specifying datafile(s) in backupset</DIV>
<DIV>input datafile fno=00003 name=/opt/oracle/oradata/boy/sysaux01.dbf</DIV>
<DIV>input datafile fno=00002 name=/opt/oracle/oradata/boy/undotbs01.dbf</DIV>
<DIV>input datafile fno=00005 name=/opt/oracle/oradata/boy/rman_ts.dbf</DIV>
<DIV>channel ORA_DISK_2: starting piece 1 at 30-JUL-09</DIV>
<DIV>channel ORA_DISK_2: finished piece 1 at 30-JUL-09</DIV>
<DIV>--开始备份数据文件(scn:609130)</DIV>
<DIV>piece handle=/opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_nnndf_TAG20090730T025407_5716pjdb_.bkp tag=TAG20090730T025407 comment=NONE</DIV>
<DIV>channel ORA_DISK_2: backup set complete, elapsed time: 00:00:26</DIV>
<DIV>channel ORA_DISK_1: finished piece 1 at 30-JUL-09</DIV>
<DIV>--开始备份数据文件(scn:609129)</DIV>
<DIV>piece handle=/opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_nnndf_TAG20090730T025407_5716pj5t_.bkp tag=TAG20090730T025407 comment=NONE</DIV>
<DIV>channel ORA_DISK_1: backup set complete, elapsed time: 00:00:42</DIV>
<DIV>Finished backup at 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>Starting backup at 30-JUL-09</DIV>
<DIV>current log archived&nbsp; --切换redo log并归档!</DIV>
<DIV>using channel ORA_DISK_1</DIV>
<DIV>using channel ORA_DISK_2</DIV>
<DIV>channel ORA_DISK_1: starting archive log backupset</DIV>
<DIV>channel ORA_DISK_1: specifying archive log(s) in backup set</DIV>
<DIV>input archive log thread=1 sequence=8 recid=44 stamp=693543290</DIV>
<DIV>channel ORA_DISK_1: starting piece 1 at 30-JUL-09</DIV>
<DIV>channel ORA_DISK_1: finished piece 1 at 30-JUL-09</DIV>
<DIV>--开始备份归档日志(scn:609123~609152)</DIV>
<DIV>piece handle=/opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_annnn_TAG20090730T025450_5716qvd3_.bkp tag=TAG20090730T025450 comment=NONE</DIV>
<DIV>channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02</DIV>
<DIV>Finished backup at 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>--开始备份控制文件和spfile(scn:609158)</DIV>
<DIV>Starting Control File and SPFILE Autobackup at 30-JUL-09</DIV>
<DIV>piece handle=/opt/oracle/flash_recovery_area/BOY/autobackup/2009_07_30/o1_mf_s_693543292_5716qws7_.bkp comment=NONE</DIV>
<DIV>Finished Control File and SPFILE Autobackup at 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>RMAN&gt; list backup;</DIV>
<DIV>&nbsp;</DIV>
<DIV>List of Backup Sets</DIV>
<DIV>===================</DIV>
<DIV>&nbsp;</DIV>
<DIV>BS Key Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device Type Elapsed Time Completion Time</DIV>
<DIV>------- ---------- ----------- ------------ ---------------</DIV>
<DIV>49&nbsp;&nbsp;&nbsp;&nbsp; 2.79M&nbsp;&nbsp;&nbsp;&nbsp; DISK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00:00:04&nbsp;&nbsp;&nbsp; 30-JUL-09&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP Key: 48&nbsp; Status: AVAILABLE Compressed: NO Tag: TAG20090730T025359</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piece Name: /opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_annnn_TAG20090730T025359_5716pgom_.bkp</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;List ofArchived Logsin backup set 49</DIV>
<DIV>&nbsp;Thrd Seq&nbsp;&nbsp;&nbsp; Low SCN&nbsp;&nbsp; Low Time Next SCN&nbsp; Next Time</DIV>
<DIV>&nbsp;---- ------- ---------- --------- ---------- ---------</DIV>
<DIV>&nbsp;1&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 604010&nbsp;&nbsp;&nbsp; 30-JUL-09609123&nbsp;&nbsp;&nbsp; 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>BS Key TypeLVSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device Type Elapsed Time Completion Time</DIV>
<DIV>------- ---- -- ---------- ----------- ------------ ---------------</DIV>
<DIV>50&nbsp;&nbsp;&nbsp;&nbsp; Full&nbsp;&nbsp; 183.75M&nbsp;&nbsp; DISK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00:00:19&nbsp;&nbsp;&nbsp; 30-JUL-09&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP Key: 49&nbsp; Status: AVAILABLE Compressed: NO Tag: TAG20090730T025407</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piece Name: /opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_nnndf_TAG20090730T025407_5716pjdb_.bkp</DIV>
<DIV>&nbsp;List ofDatafilesin backup set 50</DIV>
<DIV>&nbsp;FileLVTypeCkp SCN&nbsp;&nbsp; Ckp Time Name</DIV>
<DIV>&nbsp;---- -- ---- ---------- --------- ----</DIV>
<DIV>&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Full609130&nbsp;&nbsp;&nbsp; 30-JUL-09 /opt/oracle/oradata/boy/undotbs01.dbf</DIV>
<DIV>&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Full609130&nbsp;&nbsp;&nbsp; 30-JUL-09 /opt/oracle/oradata/boy/sysaux01.dbf</DIV>
<DIV>&nbsp;5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Full609130&nbsp;&nbsp;&nbsp; 30-JUL-09 /opt/oracle/oradata/boy/rman_ts.dbf</DIV>
<DIV>&nbsp;</DIV>
<DIV>BS Key TypeLVSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device Type Elapsed Time Completion Time</DIV>
<DIV>------- ---- -- ---------- ----------- ------------ ---------------</DIV>
<DIV>51&nbsp;&nbsp;&nbsp;&nbsp; Full&nbsp;&nbsp; 358.00M&nbsp;&nbsp; DISK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00:00:39&nbsp;&nbsp;&nbsp; 30-JUL-09&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP Key: 50&nbsp; Status: AVAILABLE Compressed: NO Tag: TAG20090730T025407</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piece Name: /opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_nnndf_TAG20090730T025407_5716pj5t_.bkp</DIV>
<DIV>&nbsp;List ofDatafilesin backup set 51</DIV>
<DIV>&nbsp;FileLVTypeCkp SCN&nbsp;&nbsp; Ckp Time Name</DIV>
<DIV>&nbsp;---- -- ---- ---------- --------- ----</DIV>
<DIV>&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Full609129&nbsp;&nbsp;&nbsp; 30-JUL-09 /opt/oracle/oradata/boy/system01.dbf</DIV>
<DIV>&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Full609129&nbsp;&nbsp;&nbsp; 30-JUL-09 /opt/oracle/oradata/boy/users01.dbf</DIV>
<DIV>&nbsp;</DIV>
<DIV>BS Key Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device Type Elapsed Time Completion Time</DIV>
<DIV>------- ---------- ----------- ------------ ---------------</DIV>
<DIV>52&nbsp;&nbsp;&nbsp;&nbsp; 6.50K&nbsp;&nbsp;&nbsp;&nbsp; DISK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00:00:01&nbsp;&nbsp;&nbsp; 30-JUL-09&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP Key: 51&nbsp; Status: AVAILABLE Compressed: NO Tag: TAG20090730T025450</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piece Name: /opt/oracle/flash_recovery_area/BOY/backupset/2009_07_30/o1_mf_annnn_TAG20090730T025450_5716qvd3_.bkp</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;List ofArchived Logsin backup set 52</DIV>
<DIV>&nbsp;Thrd Seq&nbsp;&nbsp;&nbsp; Low SCN&nbsp;&nbsp; Low Time Next SCN&nbsp; Next Time</DIV>
<DIV>&nbsp;---- ------- ---------- --------- ---------- ---------</DIV>
<DIV>&nbsp;1&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 609123&nbsp;&nbsp;&nbsp; 30-JUL-09 609152&nbsp;&nbsp;&nbsp; 30-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>BS Key TypeLVSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device Type Elapsed Time Completion Time</DIV>
<DIV>------- ---- -- ---------- ----------- ------------ ---------------</DIV>
<DIV>53&nbsp;&nbsp;&nbsp;&nbsp; Full&nbsp;&nbsp; 6.92M&nbsp;&nbsp;&nbsp;&nbsp; DISK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00:00:00&nbsp;&nbsp;&nbsp; 30-JUL-09&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BP Key: 52&nbsp; Status: AVAILABLE Compressed: NO Tag: TAG20090730T025452</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piece Name: /opt/oracle/flash_recovery_area/BOY/autobackup/2009_07_30/o1_mf_s_693543292_5716qws7_.bkp</DIV>
<DIV>&nbsp;Control FileIncluded:Ckp SCN: 609158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ckp time: 30-JUL-09</DIV>
<DIV>&nbsp;SPFILE Included: Modification time: 29-JUL-09</DIV>
<DIV>&nbsp;</DIV>
<DIV>疑问+灵感:</DIV>
<DIV>其实我没做copy备份,可是下面的命令能看到归档文件!那么是不是可以通过delete copy来删除归档文件呢?</DIV>
<DIV>答案:好像可以!</DIV>
<DIV>RMAN&gt; list copy;&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>List of Archived Log Copies</DIV>
<DIV>Key&nbsp;&nbsp;&nbsp; Thrd Seq&nbsp;&nbsp;&nbsp; S Low Time Name</DIV>
<DIV>------- ---- ------- - --------- ----</DIV>
<DIV>43&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A30-JUL-09 /opt/oracle/flash_recovery_area/BOY/archivelog/2009_07_30/o1_mf_1_7_5716p7bz_.arc</DIV>
<DIV>44&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A30-JUL-09 /opt/oracle/flash_recovery_area/BOY/archivelog/2009_07_30/o1_mf_1_8_5716qt6y_.arc</DIV></DIV>
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP