Monday, 30 September 2019

Delete old RMAN and Archives

[oraprod@taw-ora-db scripts]$ cat /home/oraprod/scripts/delete_old_backups.sh
#!/bin/bash
find /backup/CIRC/archives -name "1_*.dbf" -mtime +14 | xargs rm -rf
export BACKUPS=/backup/CIRC/backups  # The patch of the AUDIT_DUMP_DEST
find $BACKUPS -type f -name '*.BKP' -mtime +7 -exec rm -rf {} \;
find $BACKUPS -type f -name 'c-*' -mtime +7 -exec rm -rf {} \;

No comments:

Post a Comment

Number of Visitors