Странице

Ознаке

четвртак, 6. новембар 2014.

RMAN - Delete backups

#Deleting backups using primary keys from LIST output:
DELETE BACKUPPIECE 101;
#Deleting backups by filename on disk:
DELETE CONTROLFILECOPY '/tmp/control02.ctl';
#Deleting archived redo logs from disk:
DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 300;
#Deleting backups based on tags:
DELETE BACKUP TAG='before_upgrade';
#Delete backups based on the objects backed up and the media or disk location where the backup is stored:
DELETE BACKUP OF TABLESPACE users DEVICE TYPE sbt; # delete only from tape
DELETE COPY OF CONTROLFILE LIKE '/tmp/%';  # 
#Delete all backups for this database recorded in the RMAN repository:
DELETE BACKUP; 
#Delete backups and archived redo logs from disk based on whether they are backed up on tape:
DELETE ARCHIVELOG ALL
BACKED UP 3 TIMES TO sbt; 
#If you run RMAN interactively, then RMAN asks for confirmation before deleting any files. You can suppress these confirmations by using the NOPROMPT keyword with any form of the BACKUP command:
DELETE NOPROMPT ARCHIVELOG ALL; 
#If you have not performed a crosscheck recently, then issue a CROSSCHECK command. For example, issue:
CROSSCHECK BACKUP; # checks backup sets and copies on configured channels
#Delete the expired backups. For example, issue:
DELETE EXPIRED BACKUP;
#If you use the DELETE command with the optional FORCE keyword, RMAN deletes the specified backups, but ignores any I/O errors, including those that occur when a backup is missing from disk or tape. It then updates the RMAN repository to reflect the fact that the backup is deleted, regardless of whether RMAN was able to delete the file or whether the file was already missing. For example:
DELETE FORCE NOPROMPT BACKUPSET TAG 'weekly_bkup';
#If you specify the DELETE OBSOLETE command with no arguments, then RMAN deletes all obsolete backups defined by the currently configured retention policy For example:
DELETE OBSOLETE;
#You can also use the REDUNDANCY or RECOVERY WINDOW clauses with DELETE to delete backups obsolete under a specific retention policy instead of the configured default:
DELETE OBSOLETE REDUNDANCY = 3;
DELETE OBSOLETE RECOVERY WINDOW OF 7 DAYS;
Source - Oracle 

Нема коментара:

Постави коментар

Напомена: Само члан овог блога може да постави коментар.