- 最后登录
- 2017-7-25
- 在线时间
- 49 小时
- 威望
- 41
- 金钱
- 431
- 注册时间
- 2012-5-8
- 阅读权限
- 10
- 帖子
- 54
- 精华
- 1
- 积分
- 41
- UID
- 417
|
1#
发表于 2012-6-27 11:36:03
|
查看: 5847 |
回复: 5
os:Red Hat Enterprise Linux Server release 5.4 (Tikanga)
db:11.2.0.1.0
两个节点rac
用户
[oracle@syk1 rman_backup]$ id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
[oracle@syk1 rman_backup]$ id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)
归档在每个节点本地
syk1上是/arch/sykdb
syk2上是/arch/sykdb
备份过程如下:
RMAN> run{
2> allocate channel ch1 type disk;
3> allocate channel ch2 type disk;
4> backup incremental level 0 database format '/rman_backup/db_level0_%d_%T_%s_%p_%t' tag 'db_level0';
5> sql 'alter system archive log current';
6> release channel ch2;
7> release channel ch1;
8> }
released channel: ORA_DISK_1
allocated channel: ch1
channel ch1: SID=80 instance=sykdb1 device type=DISK
allocated channel: ch2
channel ch2: SID=141 instance=sykdb1 device type=DISK
Starting backup at 27-JUN-2012 11:14:08
channel ch1: starting incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00002 name=+SYKDB_DATA/sykdb/datafile/sysaux.260.778361943
input datafile file number=00004 name=+SYKDB_DATA/sykdb/datafile/undotbs2.263.778361987
input datafile file number=00005 name=+SYKDB_DATA/sykdb/datafile/users.264.778361995
channel ch1: starting piece 1 at 27-JUN-2012 11:14:09
channel ch2: starting incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00003 name=+SYKDB_DATA/sykdb/datafile/undotbs1.261.778361967
input datafile file number=00001 name=+SYKDB_DATA/sykdb/datafile/system.259.778361915
channel ch2: starting piece 1 at 27-JUN-2012 11:14:09
channel ch2: finished piece 1 at 27-JUN-2012 11:14:54
piece handle=/rman_backup/db_level0_SYKDB_20120627_98_1_787058049 tag=DB_LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:45
channel ch2: starting incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
including current control file in backup set
channel ch2: starting piece 1 at 27-JUN-2012 11:15:02
channel ch2: finished piece 1 at 27-JUN-2012 11:15:05
piece handle=/rman_backup/db_level0_SYKDB_20120627_99_1_787058095 tag=DB_LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:03
channel ch2: starting incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ch2: starting piece 1 at 27-JUN-2012 11:15:06
channel ch2: finished piece 1 at 27-JUN-2012 11:15:09
piece handle=/rman_backup/db_level0_SYKDB_20120627_100_1_787058105 tag=DB_LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:03
channel ch1: finished piece 1 at 27-JUN-2012 11:15:13
piece handle=/rman_backup/db_level0_SYKDB_20120627_97_1_787058048 tag=DB_LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:01:04
Finished backup at 27-JUN-2012 11:15:13
sql statement: alter system archive log current
released channel: ch2
released channel: ch1
RMAN> crosscheck backup;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=80 instance=sykdb1 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_98_1_787058049 RECID=97 STAMP=787058050
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_99_1_787058095 RECID=98 STAMP=787058102
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_100_1_787058105 RECID=99 STAMP=787058106
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_97_1_787058048 RECID=100 STAMP=787058050
Crosschecked 4 objects
数据文件备份没问题
下面是备份归档:
RMAN> run{
2> allocate channel ch1 type disk connect [email=sys/admin123@sykdb1]sys/admin123@sykdb1[/email];
3> allocate channel ch2 type disk connect [email=sys/admin123@sykdb2]sys/admin123@sykdb2[/email];
4> backup archivelog all format '/rman_backup/arch_level0_%s_%p_%t' tag 'arch_level0' delete all input;
5> crosscheck backup;
6> delete noprompt expired backup;
7> delete noprompt obsolete;
8> release channel ch2;
9> release channel ch1;
10> }
released channel: ORA_DISK_1
allocated channel: ch1
channel ch1: SID=198 instance=sykdb1 device type=DISK
allocated channel: ch2
channel ch2: SID=200 instance=sykdb2 device type=DISK
Starting backup at 27-JUN-2012 11:18:07
current log archived
channel ch2: starting archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=2 sequence=139 RECID=278 STAMP=787057967
channel ch2: starting piece 1 at 27-JUN-2012 11:18:10
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=261 RECID=277 STAMP=787057962
input archived log thread=1 sequence=262 RECID=280 STAMP=787058118
channel ch1: starting piece 1 at 27-JUN-2012 11:18:10
channel ch1: finished piece 1 at 27-JUN-2012 11:18:11
piece handle=/rman_backup/arch_level0_102_1_787058290 tag=ARCH_LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
channel ch1: deleting archived log(s)
archived log file name=/arch/sykdb/1_261_778361898.dbf RECID=277 STAMP=787057962
archived log file name=/arch/sykdb/1_262_778361898.dbf RECID=280 STAMP=787058118
channel ch2: finished piece 1 at 27-JUN-2012 11:18:11
piece handle=/rman_backup/arch_level0_101_1_787058290 tag=ARCH_LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch2: deleting archived log(s)
archived log file name=/arch/sykdb/2_139_778361898.dbf RECID=278 STAMP=787057967
channel ch2: starting archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=2 sequence=140 RECID=279 STAMP=787058118
input archived log thread=2 sequence=141 RECID=282 STAMP=787058289
channel ch2: starting piece 1 at 27-JUN-2012 11:18:12
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=263 RECID=281 STAMP=787058289
channel ch1: starting piece 1 at 27-JUN-2012 11:18:12
channel ch1: finished piece 1 at 27-JUN-2012 11:18:13
piece handle=/rman_backup/arch_level0_104_1_787058292 tag=ARCH_LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
channel ch1: deleting archived log(s)
archived log file name=/arch/sykdb/1_263_778361898.dbf RECID=281 STAMP=787058289
channel ch2: finished piece 1 at 27-JUN-2012 11:18:13
piece handle=/rman_backup/arch_level0_103_1_787058292 tag=ARCH_LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch2: deleting archived log(s)
archived log file name=/arch/sykdb/2_140_778361898.dbf RECID=279 STAMP=787058118
archived log file name=/arch/sykdb/2_141_778361898.dbf RECID=282 STAMP=787058289
Finished backup at 27-JUN-2012 11:18:13
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_98_1_787058049 RECID=97 STAMP=787058050
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_99_1_787058095 RECID=98 STAMP=787058102
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_100_1_787058105 RECID=99 STAMP=787058106
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/db_level0_SYKDB_20120627_97_1_787058048 RECID=100 STAMP=787058050
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/arch_level0_102_1_787058290 RECID=102 STAMP=787058290
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/arch_level0_104_1_787058292 RECID=104 STAMP=787058292
Crosschecked 6 objects
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/arch_level0_101_1_787058290 RECID=101 STAMP=787058290
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/rman_backup/arch_level0_103_1_787058292 RECID=103 STAMP=787058292
Crosschecked 2 objects
specification does not match any backup in the repository
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 101 27-JUN-2012 11:18:10
Backup Piece 101 27-JUN-2012 11:18:10 /rman_backup/arch_level0_101_1_787058290
deleted backup piece
backup piece handle=/rman_backup/arch_level0_101_1_787058290 RECID=101 STAMP=787058290
Deleted 1 objects
released channel: ch2
released channel: ch1
RMAN>
为什么arch_level0_101_1_787058290 会是被 看成obsolete呢???
rman配置采用默认。 |
|