Monday, October 17, 2016

RMAN Compress Backup Archivelog and Full Database

Archivelog Backup:

backup AS COMPRESSED BACKUPSET  archivelog all delete all input tag ORCL_ARCHIVE format '/u01/backup/rman/%d_%T_%s_%p_ARCHIVE';

Full Database and Archivelog Backup:

RUN
{
configure controlfile autobackup on;
set command id to 'ORCLOnlineBackupFull';
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
ALLOCATE CHANNEL c2 DEVICE TYPE disk;
ALLOCATE CHANNEL c3 DEVICE TYPE disk;
ALLOCATE CHANNEL c4 DEVICE TYPE disk;
backup AS COMPRESSED BACKUPSET full database tag ORCL_FULL format '/u01/backup/rman/%d_%T_%s_%p_FULL' ;
sql 'alter system archive log current';
backup AS COMPRESSED BACKUPSET  archivelog all delete all input tag ORCL_ARCHIVE format '/u01/backup/rman/%d_%T_%s_%p_ARCHIVE';
backup tag ORCL_CONTROL current controlfile format '/u01/backup/rman/%d_%T_%s_%p_CONTROL';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}


[oracle@OEL564ASMN1 rman]$ rman target/

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 18 13:48:20 2016

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

connected to target database: ASMDB (DBID=624768357)

RMAN> backup AS COMPRESSED BACKUPSET  archivelog all delete all input tag ORCL_ARCHIVE format '/u01/backup/rman/%d_%T_%s_%p_ARCHIVE';

Starting backup at 18-OCT-16
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK
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=37 RECID=35 STAMP=925050761
input archived log thread=1 sequence=38 RECID=36 STAMP=925566466
input archived log thread=1 sequence=39 RECID=37 STAMP=925566511
channel ORA_DISK_1: starting piece 1 at 18-OCT-16
channel ORA_DISK_1: finished piece 1 at 18-OCT-16
piece handle=/u01/backup/rman/ASMDB_20161018_24_1_ARCHIVE tag=ORCL_ARCHIVE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FRA/asmdb/archivelog/2016_10_12/thread_1_seq_37.362.925050753 RECID=35 STAMP=925050761
archived log file name=+FRA/asmdb/archivelog/2016_10_18/thread_1_seq_38.358.925566461 RECID=36 STAMP=925566466
archived log file name=+FRA/asmdb/archivelog/2016_10_18/thread_1_seq_39.354.925566507 RECID=37 STAMP=925566511
Finished backup at 18-OCT-16

Starting Control File and SPFILE Autobackup at 18-OCT-16
piece handle=+FRA/asmdb/autobackup/2016_10_18/s_925566523.354.925566523 comment=NONE
Finished Control File and SPFILE Autobackup at 18-OCT-16

RMAN> exit


Recovery Manager complete.
[oracle@OEL564ASMN1 rman]$

No comments:

Post a Comment