Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an RMAN setup on an Oracle 11g Windows 2003 R2 server, storing a steady stream of instrumentation values for various machinery. There are routines in place to automatically accumulate and reduce the logged values. I would like to have a simple backup script that will at any time allow me to recover the database to a given time during the last 7 days.

So, some time ago I wrote the script below. Have I understood the commands correctly, that the script will help me achieve the following, or what would I have to change?

  • always a 7 days old full backup
  • the option to recover the database to any time between 7 days ago and now
  • a stable backup size, given that the database size and activity stays the same (looks to me like the backupset had grown in size since I wrote the script - no, sorry, comparing fresh backupset with one containing 1 week of archivelogs)

Here is the script, excluding a couple of other commands, allocate channel, and configure maxpiecesize, not so interesting for the question:

run
{
recover copy of database
  with tag 'incr_update'
  until time 'sysdate - 7';
backup
  tag 'incr_update'
  incremental level 1
  for recover of copy with tag 'incr_update'
  database
  plus archivelog delete input;
backup as copy current controlfile
  tag 'incr_update';
delete noprompt backup completed before 'sysdate - 7' tag 'incr_update';
}
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.