Online Database backups


To be able to do the online backups, your database has to be in archivelog mode. You can chek it with
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/oarch
Oldest online log sequence 24
Next log sequence to archive 26
Current log sequence 26
If your database is in noarchivelog mode, you should set the log_archive_dest parameter to the path were you want to store your archived logs and then:
sqlplus "/as sysdba"
shu immediate;
startup mount;
alter database archivelog;
alter database open;
alter system switch logfile;
Online databae backup -
RMAN> backup format='/backup/database/online_%d_%U.bkp' database plus archivelog format='/backup/archivelogs/archives_%d_%U.bkp';

Starting backup at 14-JAN-14
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device 
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=16 RECID=3 STAMP=773328689
input archived log thread=1 sequence=17 RECID=4 STAMP=773328729
input archived log thread=1 sequence=18 RECID=5 STAMP=773362834
input archived log thread=1 sequence=19 RECID=6 STAMP=773446113
input archived log thread=1 sequence=20 RECID=7 STAMP=773503930
input archived log thread=1 sequence=21 RECID=8 STAMP=773504013
input archived log thread=1 sequence=22 RECID=9 STAMP=773505766
input archived log thread=1 sequence=23 RECID=10 STAMP=773505832
input archived log thread=1 sequence=24 RECID=11 STAMP=773564439
input archived log thread=1 sequence=25 RECID=12 STAMP=773586516
input archived log thread=1 sequence=26 RECID=13 STAMP=773588930
input archived log thread=1 sequence=27 RECID=14 STAMP=773589076
input archived log thread=1 sequence=28 RECID=15 STAMP=773589675
input archived log thread=1 sequence=29 RECID=16 STAMP=773589793
input archived log thread=1 sequence=30 RECID=17 STAMP=773589987
channel ORA_DISK_1: starting piece 1 at 14-JAN-14
channel ORA_DISK_1: finished piece 1 at 14-JAN-14
piece handle=/backup/archivelogs/archives_BTEST_1an1o2vd_1_1.bkp tag=TAG20120126T140634 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:48
Finished backup at 14-JAN-14
Starting backup at 14-JAN-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oracle/oradata/system01.dbf
input datafile file number=00002 name=/oracle/oradata/sysaux01.dbf
input datafile file number=00003 name=/oracle/oradata/undotbs1.dbf
input datafile file number=00004 name=/oracle/oradata/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-JAN-14
channel ORA_DISK_1: finished piece 1 at 14-JAN-14
piece handle=/backup/database/online_BTEST_1bn1o333_1_1.bkp tag=TAG20120126T140829 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 14-JAN-14
Starting backup at 14-JAN-14
current log archived
using channel ORA_DISK_1
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=31 RECID=18 STAMP=773590206
channel ORA_DISK_1: starting piece 1 at 14-JAN-14
channel ORA_DISK_1: finished piece 1 at 14-JAN-14
piece handle=/backup/archivelogs/archives_BTEST_1cn1o362_1_1.bkp tag=TAG20120126T141008 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 14-JAN-14
Starting Control File and SPFILE Autobackup at 14-JAN-14
piece handle=/backup/controlfile/c-4236471253-20120126-01 comment=NONE
Finished Control File and SPFILE Autobackup at 14-JAN-14
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: