dbTalk Databases Forums  

Re: RMAN questions

comp.databases.oracle.server comp.databases.oracle.server


Discuss Re: RMAN questions in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave Hau
 
Posts: n/a

Default Re: RMAN questions - 06-24-2003 , 02:41 PM






bcjm wrote:
Quote:
8.1.6, NT, with catalog

1. Is there a way to add the current date to the backup file or is
there a way to derive the date from the value of %t?
Easiest way would just be to do a "list backup" and look at the
completion time.

%t is the number of seconds elapsed since a fixed reference time hard
coded in RMAN. So theoretically, you can just do a test to figure out
what that fixed reference time is, and from then on, you can use that
same number to calculate the date from the %t value.

Quote:
2. How do you delete the obsolete backup file (backupset)
automatically? Say I do a full backup to disk daily. I only want to
keep the past 7 days backupset. I did not find a commend which allows
me to delete backupset that are older than 7 days. For archivelog
file I can issue "change archivelog until time='sysdate-7' delete;"
but not the backupset.
Take a look at $ORACLE_HOME/rdbms/demo/rman1.sh

In your case, you might want to change the report obsolete line to:

report obsolete until time 'SYSDATE-7'


Cheers,
Dave




Quote:
Thanks


Reply With Quote
  #2  
Old   
Arcangelo
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 07:38 AM







"bcjm" <oldcar (AT) hotmail (DOT) com> wrote

Quote:
Sure you can report the obsolete but how do you delete them automatically?

It's been a while since I looked at RMAN on 8i, but is there no 'delete
obsolete;'??

There is in 9i, just so you know.

;-^




Reply With Quote
  #3  
Old   
Brian Peasland
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 09:43 AM



Have a look at the following files:

$ORACLE_HOME/rdbms/demo/rman1.sh
$ORACLE_HOME/rdbms/demo/rman2.sh

HTH,
Brian

bcjm wrote:
Quote:
8.1.6, NT, with catalog

1. Is there a way to add the current date to the backup file or is
there a way to derive the date from the value of %t?

2. How do you delete the obsolete backup file (backupset)
automatically? Say I do a full backup to disk daily. I only want to
keep the past 7 days backupset. I did not find a commend which allows
me to delete backupset that are older than 7 days. For archivelog
file I can issue "change archivelog until time='sysdate-7' delete;"
but not the backupset.

Thanks
--
================================================== =================

Brian Peasland
oracle_dba (AT) remove_spam (DOT) peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
the three"


Reply With Quote
  #4  
Old   
Dave Hau
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 10:55 AM



"bcjm" <oldcar (AT) hotmail (DOT) com> wrote

Quote:
Sure you can report the obsolete but how do you delete them automatically?

Take a look at the script I quoted in my original reply. Again, it's

$ORACLE_HOME/rdbms/demo/rman1.sh

Cheers,
Dave




Quote:
2. How do you delete the obsolete backup file (backupset)
automatically? Say I do a full backup to disk daily. I only want to
keep the past 7 days backupset. I did not find a commend which allows
me to delete backupset that are older than 7 days. For archivelog
file I can issue "change archivelog until time='sysdate-7' delete;"
but not the backupset.
Take a look at $ORACLE_HOME/rdbms/demo/rman1.sh

In your case, you might want to change the report obsolete line to:

report obsolete until time 'SYSDATE-7'




Reply With Quote
  #5  
Old   
bcjm
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 02:58 PM



Brian Peasland <oracle_dba (AT) remove_spam (DOT) peasland.com> wrote

Quote:
Have a look at the following files:

$ORACLE_HOME/rdbms/demo/rman1.sh
$ORACLE_HOME/rdbms/demo/rman2.sh

HTH,
Brian

You would think Oracle should have the command available to delete the
backuppiece instead of making us to build it on the fly. Not everyone
is running on Unix. Window DOS scripting does not take "<<" command
if I am not mistaken.


Reply With Quote
  #6  
Old   
Dave Hau
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 03:16 PM



bcjm wrote:
Quote:
Brian Peasland <oracle_dba (AT) remove_spam (DOT) peasland.com> wrote


Have a look at the following files:

$ORACLE_HOME/rdbms/demo/rman1.sh
$ORACLE_HOME/rdbms/demo/rman2.sh

HTH,
Brian



You would think Oracle should have the command available to delete the
backuppiece instead of making us to build it on the fly. Not everyone
is running on Unix. Window DOS scripting does not take "<<" command
if I am not mistaken.
You're right. That's why in 9i, Oracle added the command DELETE
OBSOLETE to rman. You only need to use the above scripts in 8i, not 9i.

Cheers,
Dave





Reply With Quote
  #7  
Old   
Brian Peasland
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 03:41 PM



Unfortunately, the DELETE OBSOLETE commands in 9i require you to
configure a retention policy of which I personally don't like. We use
RMAN in conjunction with Legato and the Legato Module for Oracle so that
we can back up to an automated tape library system. In our Legato tape
library system, we have a retention period of 90 days. After 90 days,
the file is no longer available in the system. RMAN's retention policy
doesn't exactly work the same way. About the closest one can come to,
IIRC, is to specify that one needs no more than 90 days of archived redo
logs to apply recovery (by specifying the RECOVERY WINDOW). The other
retention policy is to specify the REDUDANCY. Personally, I wish that
they'd just let me remove stuff that is 90 days or older. And why do I
have to perform a crosscheck? Shouldn't I have to power to just remove a
backup set if I deem it is no longer necessary?

Just my troubles....
Brian

Dave Hau wrote:
Quote:
bcjm wrote:
Brian Peasland <oracle_dba (AT) remove_spam (DOT) peasland.com> wrote


Have a look at the following files:

$ORACLE_HOME/rdbms/demo/rman1.sh
$ORACLE_HOME/rdbms/demo/rman2.sh

HTH,
Brian



You would think Oracle should have the command available to delete the
backuppiece instead of making us to build it on the fly. Not everyone
is running on Unix. Window DOS scripting does not take "<<" command
if I am not mistaken.

You're right. That's why in 9i, Oracle added the command DELETE
OBSOLETE to rman. You only need to use the above scripts in 8i, not 9i.

Cheers,
Dave
--
================================================== =================

Brian Peasland
oracle_dba (AT) remove_spam (DOT) peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
the three"


Reply With Quote
  #8  
Old   
Brian Peasland
 
Posts: n/a

Default Re: RMAN questions - 06-25-2003 , 04:54 PM



I agree that 30 days is fine, for most circumstances. And in my systems,
the entire database gets backed up in 30 days. But we like to keep
multiple generations of backups around, just in case. You can call it
the "old-school ways" if you like from back in my mainframe days. And
sprinkle in some paranoia. What if I for some reason, the tape holding
my last backup has a bad spot? Then it would be nice to be able to go
back to the previous backup, or the one before that. Which is why we
have a 90 day retention policy in place.

But even if it wasn't 90 days, then substitute "30" instead of "90" in
my previous post. The concerns are still the same from my point of view.

Cheers,
Brian

Sybrand Bakker wrote:
Quote:
On Wed, 25 Jun 2003 20:41:59 GMT, Brian Peasland
oracle_dba (AT) remove_spam (DOT) peasland.com> wrote:

Personally, I wish that
they'd just let me remove stuff that is 90 days or older. And why do I
have to perform a crosscheck? Shouldn't I have to power to just remove a
backup set if I deem it is no longer necessary?

I'm not sure whether I want to be capable to go back and roll forward
for 90 days for the databases I am using RMAN on. That would pose a
real disaster as all databases are interrelated *on application*
level, and I would be forced to roll forward 8 databases for 90 days.
I think for most purposes 30 days is fine, and requiring to go back
longer is just for people who want their DBAs to retire.

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address
--
================================================== =================

Brian Peasland
oracle_dba (AT) remove_spam (DOT) peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
the three"


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.