This discussion is archived
11 Replies Latest reply: Jan 11, 2013 10:03 AM by user12159859 RSS

understanding "delete all input" and options such as "before 'SYSDATE-1' "

user12159859 Newbie
Currently Being Moderated
Hello.

I am running Oracle 11.2 on Solaris 10.

My question is regarding the options with backing up archivelogs.
My objective here is to leave archivelogs that have been backed up nightly on the server for an additional 24 hours after backing them up. (The reason is for our standby database in case I have to rebuild it and to have the archivelogs handy without restoring them.)

My current backup statement for archive logs is:
backup
 tag='archivelogs'
 archivelog all
 delete all input
 format '$DESTDIR/%T_%d_ARCH_%s_%p.af';
I considered to add *before 'SYSDATE-1' to the above statement as follows:
 delete all input before 'SYSDATE-1'
Would this keep the archivelogs on the server for additional day?
And, would it delete the archives automatically that would be older than one day?

I also have the following lines after my main backups run:
run {
crosscheck backup;
crosscheck copy;
delete noprompt expired backup;
crosscheck archivelog all;
delete noprompt archivelog all completed before 'SYSDATE-1';   <==========
#delete noprompt force obsolete DEVICE TYPE disk;
}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points