Monday, February 14, 2011

Backing up archive logs

Further our previous discussion (here) about setting up RMAN catalog, let's demo the removal of archive logs after backup.

Start up the rman session again.

Issue the rman command that backs up archives and also removes the inputs. While it's running, you have a moment to review the archive destination.

The archive destination is as follows

-rw-r----- 1 oracle oinstall 52023296 Feb 11 23:01 1_4_742858742.dbf
-rw-r----- 1 oracle oinstall 41651200 Feb 12 10:08 1_5_742858742.dbf
-rw-r----- 1 oracle oinstall 31639040 Feb 12 20:19 1_6_742858742.dbf
-rw-r----- 1 oracle oinstall 91136 Feb 12 20:20 1_7_742858742.dbf
-rw-r----- 1 oracle oinstall 41349632 Feb 12 22:32 1_8_742858742.dbf
-rw-r----- 1 oracle oinstall 41532416 Feb 13 10:07 1_9_742858742.dbf
-rw-r----- 1 oracle oinstall 44419584 Feb 13 22:21 1_10_742858742.dbf
-rw-r----- 1 oracle oinstall 25357312 Feb 14 16:31 1_11_742858742.dbf
-rw-r----- 1 oracle oinstall 1024 Feb 14 16:31 1_12_742858742.dbf

Just before the rman backup finishes, it will delete the backed up archives.

Check the backup location, and you will see the new file it just created

-rw-r----- 1 oracle oinstall 278062592 Feb 14 16:31 05m4lj2f_1_1

If we want to restore a particular archive log, we can do so.

For example, if we want log sequence #5, we can see it will bring it back:

-rw-r----- 1 oracle oinstall 41651200 Feb 14 16:47 1_5_742858742.dbf

No comments:

Post a Comment