RMAN Online Backups

From Oracle FAQ
Jump to: navigation, search

This articles describes how to do on-line backups with RMAN.

Contents

[edit] Ensure the database is in ARCHIVELOG MODE

RMAN can only take online backups if the database is in ARCHIVELOG mode.

SQL> select LOG_MODE from v$database;
LOG_MODE
------------
ARCHIVELOG

1 row selected.

[edit] Ensure the database is running

Ensure your database is up and running before starting the on-line backup:

SQL> startup;
ORACLE instance started.
Total System Global Area  209715200 bytes
Fixed Size                  1289748 bytes
Variable Size             138412524 bytes
Database Buffers           67108864 bytes
Redo Buffers                2904064 bytes
Database mounted.
Database opened.
SQL> exit;

[edit] Use RMAN to backup

Now, let's use RMAN to backup the database:

$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Wed May 30 20:32:56 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: O10GR2 (DBID=1094333359)

RMAN> backup database;

Starting backup at 30-MAY-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=141 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/system01.dbf
input datafile fno=00003 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/sysaux01.dbf
input datafile fno=00005 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/example01.dbf
input datafile fno=00004 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/users01.dbf
input datafile fno=00002 name=/app/oracle/product/10.2.0/db_1/oradata/o10gr2/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
piece handle=/app/oracle/product/10.2.0/db_1/flash_recovery_area/O10GR2/backupset/2007_05_30/o1_mf_nnndf_TAG20070530T203304_35vjv1k4_.bkp tag=TAG20070530T203304 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:26
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 30-MAY-07
channel ORA_DISK_1: finished piece 1 at 30-MAY-07
piece handle=/app/oracle/product/10.2.0/db_1/flash_recovery_area/O10GR2/backupset/2007_05_30/o1_mf_ncsnf_TAG20070530T203304_35vjxrl5_.bkp tag=TAG20070530T203304 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 30-MAY-07

[edit] Also see