Showing posts with label keep until. Show all posts
Showing posts with label keep until. Show all posts

Thursday, June 12, 2014

Backup with Keep until time and restore point

1.Script to take backup with keep until and restore point clause
backup
database
tag="full_bkp_db"
keep until time "sysdate+30"
restore point rp1
format="/u01/app/orcl/oracle/%U";

2.Output of script execution
[oracle@ol6-112-rac1 ~]$ export ORACLE_SID=cvrman
[oracle@ol6-112-rac1 ~]$ rman target="/"

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jun 12 13:13:29 2014

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

connected to target database: CVRMAN (DBID=659771233)

RMAN> connect catalog rman/rman@orcl1

connected to recovery catalog database

RMAN>

RMAN>

RMAN> backup
2> database
3> tag="full_bkp_db"
4> keep until time "sysdate+30"
5> restore point rp1
6> format="/u01/app/orcl/oracle/%U";

Starting backup at 12-JUN-14
current log archived

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=73 device type=DISK
backup will be obsolete on date 12-JUL-14
archived logs required to recover from this backup will be backed up
file 5 is excluded from whole database backup
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/cvrman/datafile/system.304.849559339
input datafile file number=00002 name=+DATA/cvrman/datafile/sysaux.286.849559341
input datafile file number=00003 name=+DATA/cvrman/datafile/undotbs1.270.849559341
input datafile file number=00004 name=+DATA/cvrman/datafile/users.391.849559341
channel ORA_DISK_1: starting piece 1 at 12-JUN-14
channel ORA_DISK_1: finished piece 1 at 12-JUN-14
piece handle=/u01/app/orcl/oracle/3upalfun_1_1 tag=FULL_BKP_DB comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:25

using channel ORA_DISK_1
backup will be obsolete on date 12-JUL-14
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 12-JUN-14
channel ORA_DISK_1: finished piece 1 at 12-JUN-14
piece handle=/u01/app/orcl/oracle/3vpalg3h_1_1 tag=FULL_BKP_DB comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02


current log archived
using channel ORA_DISK_1
backup will be obsolete on date 12-JUL-14
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=61 STAMP=850051194
channel ORA_DISK_1: starting piece 1 at 12-JUN-14
channel ORA_DISK_1: finished piece 1 at 12-JUN-14
piece handle=/u01/app/orcl/oracle/40palg42_1_1 tag=FULL_BKP_DB comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

using channel ORA_DISK_1
backup will be obsolete on date 12-JUL-14
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 12-JUN-14
channel ORA_DISK_1: finished piece 1 at 12-JUN-14
piece handle=/u01/app/orcl/oracle/41palg47_1_1 tag=FULL_BKP_DB comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 12-JUN-14


3.List the restore point
RMAN> list restore point all;

SCN              RSP Time  Type       Time      Name
---------------- --------- ---------- --------- ----
1256958                               12-JUN-14 RP1