Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> RMAN - How to remove old backup files?
Using RMAN, I can create the backup files and using the code from
$ORACLE_HOME/rdbms/demo/rman1.sh I can remove MOST of the obsolete
database files.
I'm trying to automate the backup procedures on a system with limited disk space. The Oracle database is used as a prepaid system that is prevented from growing. The problem with disk space is due to archived redo files and obsolete backup files.
I'm wondering what is necessary to remove old archivelog backup files from within a script. I haven't found a way to delete the files from the "channel ch2" section below.
The problem is the archivelog backup file doesn't show up as "obsolete" so that it gets deleted. I can see that there are backup files using:
RMAN> list backup of archivelog all;
I'm using Oracle 8.1.5 on SPARC Solaris8:
rman target / nocatalog log ... cmdfile <see below>
run {
allocate channel ch1 type disk;
backup (database format '/dbs/backup/%U_%ddb');
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
release channel ch1;
}
run {
allocate channel ch2 type disk;
backup (archivelog all format '/dbs/backup/%U_%dredo' delete input);
release channel ch2;
}
run {
allocate channel ch3 type disk;
copy current controlfile to '/dbs/backup/nightly.ctl';
release channel ch3;
}
What I've been doing to test the backup scripts is to run them over and over and then examining the files on disk. I can see the files get created and I can see files get deleted.
Currently I don't have a load on the system to generate archived redo log files. Once I fix this problem, I will add a test load so that I can test that the "delete input" command does actually remove the old archived redo log files.
Thanks,
Jamie Royer Received on Sat Feb 14 2004 - 19:58:53 CST
![]() |
![]() |