Skip to content
Home » Oracle Database » How to Clean Fast Recovery Area by RMAN (5/8) - Delete Specific Backup or Copy

How to Clean Fast Recovery Area by RMAN (5/8) - Delete Specific Backup or Copy

How to Clean Fast Recovery Area by RMAN (4/8) - Delete Specific Archivelog
The concept of deleting a specific range of backups is similar with the deleting a specific range of archivelogs, but use the keyword COMPLETED BEFORE instead.
RMAN> delete backup completed before 'sysdate-60';

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1       1       1   1   AVAILABLE   DISK        /tmp/database_backups/07npvr1c_1_1.bak
2       2       1   1   AVAILABLE   DISK        /tmp/database_backups/08npvr5r_1_1.bak
3       3       1   1   AVAILABLE   DISK        /tmp/database_backups/09npvr60_1_1.bak
4       4       1   1   AVAILABLE   DISK        /tmp/database_backups/0anpvr62_1_1.bak

Do you really want to delete the above objects (enter YES or NO)? yes
...

Another way to specify time.
RMAN> delete backup completed before "to_date('2012-12-01','yyyy-mm-dd')";

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1       1       1   1   AVAILABLE   DISK        /tmp/database_backups/07npvr1c_1_1.bak
2       2       1   1   AVAILABLE   DISK        /tmp/database_backups/08npvr5r_1_1.bak
3       3       1   1   AVAILABLE   DISK        /tmp/database_backups/09npvr60_1_1.bak
4       4       1   1   AVAILABLE   DISK        /tmp/database_backups/0anpvr62_1_1.bak

Do you really want to delete the above objects (enter YES or NO)? yes
...

Or, you can delete a specific tag of backup.
RMAN> delete backup tag=TAG20121217T113005;

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
5       5       1   1   AVAILABLE   DISK        +DATA/primdb/backupset/2012_12_17/nnndf0_tag20121217t113005_0.1094.802265461

Do you really want to delete the above objects (enter YES or NO)? yes
...

More granularly, delete a specific backup piece or backup set.
RMAN> delete backuppiece 5;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=33 instance=primdb1 device type=DISK

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
5       5       1   1   AVAILABLE   DISK        +DATA/primdb/backupset/2012_12_17/nnndf0_tag20121217t113005_0.1094.802265461

Do you really want to delete the above objects (enter YES or NO)? yes
...
RMAN> delete backupset 6;

using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
6       6       1   1   AVAILABLE   DISK        +DATA/primdb/autobackup/2012_12_17/s_802265992.1095.802266029

Do you really want to delete the above objects (enter YES or NO)? yes
...

How to Clean Fast Recovery Area by RMAN (6/8) - Delete All Archivelog

Leave a Reply

Your email address will not be published. Required fields are marked *