4

I am trying to scrape together some space in my Oracle 11g backup directory in AIX. I have deleted obsolete files using RMAN's "DELETE OBSOLETE" command, but I see many (just under 200) files dated from over two months ago although my backup policy should only be retaining backups for two days. Here is a sample:

-rw-r-----    1 oracle   oinstall 21342912512 Sep 09 03:02 v1pi0pe8_1_1
-rw-r-----    1 oracle   oinstall 8866766848 Sep 09 07:23 v2pi0pe9_1_1
-rw-r-----    1 oracle   oinstall 13993369600 Sep 09 01:29 v3pi0pe9_1_1
-rw-r-----    1 oracle   oinstall 11262451712 Sep 09 00:16 v4pi0pe9_1_1
-rw-r-----    1 oracle   oinstall    1402368 Sep 08 19:15 v5pi0qa2_1_1
-rw-r-----    1 oracle   oinstall    1058304 Sep 08 19:45 v7pi0s2i_1_1
-rw-r-----    1 oracle   oinstall   42467840 Nov 22 22:41 v7po9ir3_1_1
-rw-r-----    1 oracle   oinstall   52970496 Nov 22 22:41 v8po9ir3_1_1
-rw-r-----    1 oracle   oinstall    1512448 Sep 08 20:15 v9pi0tqi_1_1
-rw-r-----    1 oracle   oinstall    9109504 Sep 08 20:45 vbpi0vj0_1_1
-rw-r-----    1 oracle   oinstall    1568256 Sep 08 21:15 vdpi11b4_1_1
-rw-r-----    1 oracle   oinstall  113734144 Nov 23 22:55 vepoc80o_1_1
-rw-r-----    1 oracle   oinstall    1021440 Sep 08 21:45 vfpi133g_1_1
-rw-r-----    1 oracle   oinstall   11592704 Sep 08 22:15 vhpi14rj_1_1
-rw-r-----    1 oracle   oinstall    1103360 Sep 08 22:45 vjpi16jv_1_1
-rw-r-----    1 oracle   oinstall    1811968 Sep 08 23:15 vlpi18c8_1_1
-rw-r-----    1 oracle   oinstall    1074176 Sep 08 23:45 vnpi1a4b_1_1
-rw-r-----    1 oracle   oinstall    1503744 Sep 09 00:15 vppi1bsh_1_1
-rw-r-----    1 oracle   oinstall    1081856 Sep 09 00:45 vrpi1dkr_1_1
-rw-r-----    1 oracle   oinstall    1534976 Sep 09 01:15 vtpi1fd4_1_1
-rw-r-----    1 oracle   oinstall    1088512 Sep 09 01:45 vvpi1h5e_1_1

Is there a way to clean up the old files? (You can see there are some current files there also. Those need to stay.) I cannot find a way to tell whether they are needed for restores, although I don't know why they would be. I have run crosschecks and everything seems OK.

1 Answer 1

4

Maybe those files are not cataloged by RMAN? I would CATALOG them and then DELETE OBSOLETE once again.

4
  • +1 it's a good idea to let rman handle the deletion. So you avoid to delete files that are needed by rman erroneously.
    – miracle173
    Commented Nov 24, 2014 at 22:17
  • Thanks! Cataloging the files and re-deleting the obsolete files did the trick. (I was under the impression it could only be done if there was a recovery catalog set up, but it is valid for any repository.) For the record -- and for Google visitors -- using statements like this in RMAN was all I needed: CATALOG BACKUPPIECE '/backup/lawtest/2epi2vtg_1_1'; Cataloging all the files and running DELETE OBSOLETE freed up a good bit of space. Also, a thousand blessings upon Notepad++ and its macro facility.
    – Silverlock
    Commented Nov 25, 2014 at 14:32
  • 2
    @Silverlock Do you know you could use CATALOG START WITH '/path/to/dir/wit/backups/'? It will catalog all the files in path, excluding ones that already in catalog. Just a thought :)
    – elfcheg
    Commented Nov 25, 2014 at 16:34
  • I did not know about CATALOG START WITH . . . I ended up using it just now in a different context. Thanks!
    – Silverlock
    Commented Nov 26, 2014 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.