我的学习笔记:
我的试验
RMAN> run{
2> allocate channel t1 type disk maxpiecesize 10m;
3> backup database format='/oradatatest/%d_%T_%s_%p_.bak' filesperset 1;
4> }
完成后查看文件
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_10_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_11_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_12_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_13_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_14_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_15_.bak
-rw-r----- 1 oracle oinstall 2867200 Feb 19 18:50 GELCPRO_20090219_10_16_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_1_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_2_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_3_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_4_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_5_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_6_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_7_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_10_8_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_10_9_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_1_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_2_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_3_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_4_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_5_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_6_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_7_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_11_8_.bak
-rw-r----- 1 oracle oinstall 7118848 Feb 19 18:50 GELCPRO_20090219_11_9_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_12_1_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:50 GELCPRO_20090219_12_2_.bak
-rw-r----- 1 oracle oinstall 2146304 Feb 19 18:50 GELCPRO_20090219_12_3_.bak
-rw-r----- 1 oracle oinstall 7110656 Feb 19 18:50 GELCPRO_20090219_13_1_.bak
-rw-r----- 1 oracle oinstall 98304 Feb 19 18:50 GELCPRO_20090219_14_1_.bak
-rw-r----- 1 oracle oinstall 108032 Feb 19 18:37 GELCPRO_20090219_7_1_arc.bak
-rw-r----- 1 oracle oinstall 18432 Feb 19 18:37 GELCPRO_20090219_8_1_arc.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_10_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_11_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_12_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_13_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_14_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_15_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_16_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_17_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_18_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_19_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:48 GELCPRO_20090219_9_1_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_20_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_21_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_22_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_23_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_24_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_25_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_26_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_27_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_28_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_29_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:48 GELCPRO_20090219_9_2_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_30_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_31_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_32_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_33_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_34_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_35_.bak
-rw-r----- 1 oracle oinstall 9592832 Feb 19 18:49 GELCPRO_20090219_9_36_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:48 GELCPRO_20090219_9_3_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:48 GELCPRO_20090219_9_4_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_5_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_6_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_7_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_8_.bak
-rw-r----- 1 oracle oinstall 10485760 Feb 19 18:49 GELCPRO_20090219_9_9_.bak
[oracle@dba oradatatest]$
虽然有点乱但是大家可以看到很多文件都是10m 这就是一个备份片段,
我使用的格式为/%d_%T_%s_%p_. 及%d数据库名。%T时间邮戳,%s备份集合标示,%p备份片表示。GELCPRO_20090219_9_8就是这样的形式 仔细观察/%d_%T_%s_%p当%s不变的情况下%p不断变化。这就表示一个备份集合里面的备份片GELCPRO_20090219_9_8表示第9个备份集合中的第8片段。
然后我们来看看相关概念:
---备份集