Monday, January 23, 2012

RMAN Backup archielogs from SCN

If you want to backup from SCN until the latest one generated use below as below:

oracle@Linux01:[/u01/app/oracle] $ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jan 19 11:49:42 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=33581878474)


RMAN> BACKUP ARCHIVELOG FROM SEQUENCE 15 format '/u01/app/oracle/backup/ORCL_ARCHBKP_%U' tag 'ARCH_BKP';

Starting backup at 19-JAN-13
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=44 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=15 RECID=15 STAMP=901018555
input archived log thread=1 sequence=16 RECID=16 STAMP=901025590
input archived log thread=1 sequence=17 RECID=17 STAMP=901032775
input archived log thread=1 sequence=18 RECID=18 STAMP=901103089
input archived log thread=1 sequence=19 RECID=19 STAMP=901189465
input archived log thread=1 sequence=20 RECID=20 STAMP=901443077
input archived log thread=1 sequence=21 RECID=21 STAMP=901471668
input archived log thread=1 sequence=22 RECID=22 STAMP=901479677
input archived log thread=1 sequence=23 RECID=23 STAMP=901540229
channel ORA_DISK_1: starting piece 1 at 19-JAN-13
channel ORA_DISK_1: finished piece 1 at 19-JAN-13
piece handle=/u01/app/oracle/backup/ORCL_ARCHBKP_01qroqc6_1_1 tag=ARCH_BKP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:28
Finished backup at 19-JAN-13


IF you need to backup from SCN until SCN use below cmd:

Example :

RMAN> 

BACKUP ARCHIVELOG FROM SEQUENCE 288 UNTIL SEQUENCE 388 ;