热门关键字:  ubuntu  分区  linux系统进程  Fedora  函数

RMAN的备份\恢复过程

来源: 作者: 时间:2008-07-03 Tag: 点击:
环境描述:
系统中有多台基于AIX的ORACLE目的数据库,有一台基于windows的oracle catalog数据库
每天数据库做全备份;
备份脚本如下:
run
{ allocate channel t1 device type disk;
backup as compressed backupset
skip offline
skip inaccessible
tag full_backup
format '/VOL4/lpar4/subta/rman/subta_full_backup_%U_%p_%T.bk'
(database include current controlfile);
sql 'alter system archive log current';
backup as compressed backupset
format '/VOL4/lpar4/subta/rman/subta_archlog_%U_%T.bk'
(archivelog until time 'SYSDATE'
delete input);
release channel t1;
}
resync catalog;
----
日志如下,生成6个文件,2个full backup的文件,2个archivelog备份文件,2个controlfile备份文件.
RMAN> run
2> { allocate channel t1 device type disk;
3> backup as compressed backupset
4> skip offline
5> skip inaccessible
6> tag full_backup
7> format '/VOL4/lpar4/subta/rman/subta_full_backup_%U_%p_%T.bk'
8> (database include current controlfile);
9> sql 'alter system archive log current';
10> backup as compressed backupset
11> format '/VOL4/lpar4/subta/rman/subta_archlog_%U_%T.bk'
12> (archivelog until time 'SYSDATE'
13> delete input);
14> release channel t1;
15> }
resync catalog;using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=324 devtype=DISK
Starting backup at 01-JUL-08
channel t1: starting compressed full datafile backupset
channel t1: specifying datafile(s) in backupset
input datafile fno=00001 name=/subtaoradata/system01.dbf
input datafile fno=00003 name=/subtaoradata/sysaux01.dbf
input datafile fno=00005 name=/subtadata/SUBTA.dbf
input datafile fno=00002 name=/subtaoradata/undotbs01.dbf
input datafile fno=00004 name=/subtaoradata/users01.dbf
channel t1: starting piece 1 at 01-JUL-08
channel t1: finished piece 1 at 01-JUL-08
piece handle=/VOL4/lpar4/subta/rman/subta_full_backup_i0jkdhpo_1_1_1_20080701.bk tag=FULL_BACKUP comment=NONE
channel t1: backup set complete, elapsed time: 00:00:45
channel t1: starting compressed full datafile backupset
channel t1: specifying datafile(s) in backupset
including current control file in backupset
channel t1: starting piece 1 at 01-JUL-08
channel t1: finished piece 1 at 01-JUL-08
piece handle=/VOL4/lpar4/subta/rman/subta_full_backup_i1jkdhr5_1_1_1_20080701.bk tag=FULL_BACKUP comment=NONE
channel t1: backup set complete, elapsed time: 00:00:01
Finished backup at 01-JUL-08
Starting Control File Autobackup at 01-JUL-08
piece handle=/VOL4/lpar4/subta/rman/controlfile_c-2249798765-20080701-0e comment=NONE
Finished Control File Autobackup at 01-JUL-08
sql statement: alter system archive log current
Starting backup at 01-JUL-08
channel t1: starting compressed archive log backupset
channel t1: specifying archive log(s) in backup set
input archive log thread=1 sequence=5 recid=84 stamp=658949993
channel t1: starting piece 1 at 01-JUL-08
channel t1: finished piece 1 at 01-JUL-08
piece handle=/VOL4/lpar4/subta/rman/subta_archlog_i3jkdhr9_1_1_20080701.bk tag=TAG20080701T173953 comment=NONE
channel t1: backup set complete, elapsed time: 00:00:02
channel t1: deleting archive log(s)
archive log filename=/archivelog/subta_arch_log/1_5_658949077.dbf recid=84 stamp=658949993
Finished backup at 01-JUL-08
Starting Control File Autobackup at 01-JUL-08
piece handle=/VOL4/lpar4/subta/rman/controlfile_c-2249798765-20080701-0f comment=NONE
Finished Control File Autobackup at 01-JUL-08
released channel: t1
RMAN>
上一篇:没有了
下一篇:没有了
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册