博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[20180423]关于rman备份的问题2.txt
阅读量:6257 次
发布时间:2019-06-22

本文共 8791 字,大约阅读时间需要 29 分钟。

[20180423]关于rman备份的问题2.txt

--//别人问的问题,rman备份放在哪里的问题.

SCOTT@book> @ ver1

PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

--//测试前删除归档以及备份集.

delete backupset;
delete archivelog all ;

RMAN> backup database include current controlfile plus archivelog format ='/home/oracle/backup/full-%u_%s.bak';

Starting backup at 2018-04-23 09:17:06
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=54 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=67 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=780 RECID=1405 STAMP=974193426
channel ORA_DISK_1: starting piece 1 at 2018-04-23 09:17:07
channel ORA_DISK_1: finished piece 1 at 2018-04-23 09:17:08
piece handle=/home/oracle/backup/full-fat120oj_490.bak tag=TAG20180423T091707 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2018-04-23 09:17:08

Starting backup at 2018-04-23 09:17:08

using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/mnt/ramdisk/book/sysaux01.dbf
input datafile file number=00005 name=/mnt/ramdisk/book/example01.dbf
channel ORA_DISK_1: starting piece 1 at 2018-04-23 09:17:08
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00001 name=/mnt/ramdisk/book/system01.dbf
input datafile file number=00004 name=/mnt/ramdisk/book/users01.dbf
channel ORA_DISK_2: starting piece 1 at 2018-04-23 09:17:08
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/mnt/ramdisk/book/undotbs01.dbf
input datafile file number=00006 name=/mnt/ramdisk/book/tea01.dbf
channel ORA_DISK_3: starting piece 1 at 2018-04-23 09:17:08
channel ORA_DISK_3: finished piece 1 at 2018-04-23 09:17:09
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_nnndf_TAG20180423T091708_fftf0nwc_.bkp tag=TAG20180423T091708 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_3: starting piece 1 at 2018-04-23 09:17:10
channel ORA_DISK_1: finished piece 1 at 2018-04-23 09:17:17
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_nnndf_TAG20180423T091708_fftf0nw0_.bkp tag=TAG20180423T091708 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09
channel ORA_DISK_2: finished piece 1 at 2018-04-23 09:17:17
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_nnndf_TAG20180423T091708_fftf0nw6_.bkp tag=TAG20180423T091708 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:09
channel ORA_DISK_3: finished piece 1 at 2018-04-23 09:17:17
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_ncnnf_TAG20180423T091708_fftf0pyp_.bkp tag=TAG20180423T091708 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:07
Finished backup at 2018-04-23 09:17:18

Starting backup at 2018-04-23 09:17:18

current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=781 RECID=1407 STAMP=974193438
channel ORA_DISK_1: starting piece 1 at 2018-04-23 09:17:18
channel ORA_DISK_1: finished piece 1 at 2018-04-23 09:17:19
piece handle=/home/oracle/backup/full-fft120ou_495.bak tag=TAG20180423T091718 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2018-04-23 09:17:19

Starting Control File and SPFILE Autobackup at 2018-04-23 09:17:19

piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2018_04_23/o1_mf_s_974193439_fftf0z9q_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2018-04-23 09:17:20

RMAN> list backupset summary;

List of Backups
===============
Key     TY LV S Device Type Completion Time     #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
202     B  A  A DISK        2018-04-23 09:17:07 1       1       NO         TAG20180423T091707
203     B  F  A DISK        2018-04-23 09:17:08 1       1       NO         TAG20180423T091708
204     B  F  A DISK        2018-04-23 09:17:14 1       1       NO         TAG20180423T091708
205     B  F  A DISK        2018-04-23 09:17:14 1       1       NO         TAG20180423T091708
206     B  F  A DISK        2018-04-23 09:17:14 1       1       NO         TAG20180423T091708
207     B  A  A DISK        2018-04-23 09:17:18 1       1       NO         TAG20180423T091718
208     B  F  A DISK        2018-04-23 09:17:19 1       1       NO         TAG20180423T091719

--//许多备份集,而检查/home/oracle/backup/目录,仅仅发现

$ ll  full-*

-rw-r----- 1 oracle oinstall 95232 2018-04-23 09:17:07 full-fat120oj_490.bak
-rw-r----- 1 oracle oinstall 10240 2018-04-23 09:17:18 full-fft120ou_495.bak

RMAN> list backupset 202,207;

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
202     92.50K     DISK        00:00:00     2018-04-23 09:17:07
        BP Key: 203   Status: AVAILABLE  Compressed: NO  Tag: TAG20180423T091707
        Piece Name: /home/oracle/backup/full-fat120oj_490.bak

  List of Archived Logs in backup set 202

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    780     13277960229 2018-04-23 09:14:13 13277960522 2018-04-23 09:17:06

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ -------------------
207     9.50K      DISK        00:00:00     2018-04-23 09:17:18
        BP Key: 208   Status: AVAILABLE  Compressed: NO  Tag: TAG20180423T091718
        Piece Name: /home/oracle/backup/full-fft120ou_495.bak

  List of Archived Logs in backup set 207

  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    781     13277960522 2018-04-23 09:17:06 13277960553 2018-04-23 09:17:18

--//也就是备份集202,207 在/home/oracle/backup目录的2个备份文件,实际上仅仅是归档备份文件.

--//而真正的数据文件备份放在FAST_RECOVERY_AREA.

RMAN> list backupset 203,204,205;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
203     Full    3.40M      DISK        00:00:00     2018-04-23 09:17:08
        BP Key: 204   Status: AVAILABLE  Compressed: NO  Tag: TAG20180423T091708
        Piece Name: /u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_nnndf_TAG20180423T091708_fftf0nwc_.bkp
  List of Datafiles in backup set 203
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  3       Full 13277960539 2018-04-23 09:17:08 /mnt/ramdisk/book/undotbs01.dbf
  6       Full 13277960539 2018-04-23 09:17:08 /mnt/ramdisk/book/tea01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------
204     Full    10.23M     DISK        00:00:05     2018-04-23 09:17:14
        BP Key: 205   Status: AVAILABLE  Compressed: NO  Tag: TAG20180423T091708
        Piece Name: /u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_ncnnf_TAG20180423T091708_fftf0pyp_.bkp
  Control File Included: Ckp SCN: 13277960540   Ckp time: 2018-04-23 09:17:08

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------
205     Full    673.10M    DISK        00:00:06     2018-04-23 09:17:14
        BP Key: 206   Status: AVAILABLE  Compressed: NO  Tag: TAG20180423T091708
        Piece Name: /u01/app/oracle/fast_recovery_area/BOOK/backupset/2018_04_23/o1_mf_nnndf_TAG20180423T091708_fftf0nw0_.bkp
  List of Datafiles in backup set 205
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  2       Full 13277960537 2018-04-23 09:17:08 /mnt/ramdisk/book/sysaux01.dbf
  5       Full 13277960537 2018-04-23 09:17:08 /mnt/ramdisk/book/example01.dbf

--//关于这个问题我链接:
--//提到,实际上前面写的仅仅多归档有效.写成类似如下,就ok了.具体就不测试了.这也是许多初学常见错误.

backup as compressed backupset full database tag='full 20161220' format '/home/oracle/backup/full20161220_%U'

       plus archivelog  not  backed up 2 times tag="archivelog 20161220" format '/home/oracle/backup/arch20161220_%U';

--//我个人喜欢分开执行,备份数据库文件以及归档文件,分开执行.或者以前就遇到这个问题,当时不知道如何规避.^_^.

转载地址:http://czisa.baihongyu.com/

你可能感兴趣的文章
Solidity notes
查看>>
网上购物系统(Task005)——通用数据库访问函数集SqlHelper类
查看>>
java 单例模式浅析
查看>>
Codeforces Round #389 (Div. 2,) B C
查看>>
python中configparser模块记录
查看>>
IIIDX[九省联考2018]
查看>>
Protobuf3 序列化
查看>>
C语言面试题大汇总
查看>>
JavaSE-List常用方法
查看>>
json 和 pickel 详解
查看>>
Linux基础命令之grep
查看>>
python自动化开发-7
查看>>
使用VS2010+SVN出現的問題
查看>>
谁说Javascript简单的?
查看>>
UVA 1374 Power Calculus
查看>>
表结构更改后或新增加数据后同步到表中
查看>>
软媒魔方u盘装系统
查看>>
python中的文件操作小结1
查看>>
ggplot2 geom设置—散点图
查看>>
inotify+rsync 实时同步目录文件
查看>>