-
Removing Archived logs
As my username suggests, I'm more familiar with Informix than Oracle. I administer over 14 Informix instances here, and I have a few Oracle instances that I must maintain, also.
In doing so, I've found that there are alot of archived log files (over 2yrs old) in the $ORACLE_HOME/admin/$SID/arch dir. I'm fairly sure most of these log files are not needed for recovery, and I'd like to delete them.
Is deleting them with the unix "rm" command, the proper way to do so? Or does Oracle recommend a better way? I could not find any documentation on the removal of these files. Thanks for your help.
-
take a cold back for system before your remove the archive
and yeap "rm" will do the trick
-
You might want to consider compressing older archived logs. We do that via a nightly cron job:
00 22,8 * * * /usr/contrib/bin/gzip /u623/oradata/arch/DBNAME/*.arc > /dev/null
We delete the old archived logs after our weekly hot backup is completed.
The cleanup script looks like this. (you pass in the instance name)
>more cleanup_archive.sh
#! /bin/sh
INSTANCE=/u623/oradata/arch/$1
cd $INSTANCE
/bin/find "$INSTANCE" -type f -name "arch_$1_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].arc*" -mtime +7 -print -exec rm -f {
} \;
exit 0
This deletes archive logs older than 7 days.
Last edited by KenEwald; 06-12-2003 at 04:22 PM.
-
Originally posted by mike2000
take a cold back for system before your remove the archive
and yeap "rm" will do the trick
Why whats the need of taking a cold backup ??
As for the question. You need to find out when the last few backups were taken. Keep the archive for last two (or three) backup and remove the rest of the archive logs. To be on the safer side copy them on some tape drives (not all but say archived log 1 week older than your 3rd last backup) and then remove the archived logs.
HTH
Amar
"There is a difference between knowing the path and walking the path."
-
A cold backup would give a solid point at which to delete archived logs.
For an informix guy that's a good, simple, straightforward suggestion.
It's simple and it'll work.
-
Originally posted by KenEwald
A cold backup would give a solid point at which to delete archived logs.
Hmmm... only if down time is allowed.
Amar
"There is a difference between knowing the path and walking the path."
-
-
I have "cold" backups running every Sunday morning, so I should be ok to start deleting the "older" log files. Thanks for your help guys.
-
Originally posted by KenEwald
A cold backup would give a solid point at which to delete archived logs.
For an informix guy that's a good, simple, straightforward suggestion.
It's simple and it'll work.
Please! Don't give the informix_guy the wrong impresson that cold backup would be in any way more solid point to delete arch logs than a hot backup would. That would make him to be one more of the loosers that belive in urban legend that cold backup is anything safer (or simplier) than the hot backup
Any full backup (either hot or cold) is the same in respect of which old arch logs you still need.
I also don't understand the meaning of "[Cold backup (and recovery from it)] is simple and it'll work". In what part is it simplier than hot backup and in which case hot backup would not work?
So informix_guy, here is the consise answer to your question:
When performing media recovery, you'll never need any arch log that was created before your backup (either hot or cold), from which you restored the database, was taken. So you'll have to decide which backup is the earliest possible one that you'll ever need for recovery, and you can safely delete all arch logs that were created befor that backup started.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Originally posted by jmodic
When performing media recovery, you'll never need any arch log that was created before your backup (either hot or cold), from which you restored the database, was taken. So you'll have to decide which backup is the earliest possible one that you'll ever need for recovery, and you can safely delete all arch logs that were created befor that backup started.
*clap* *clap* *clap*
That's a very good answer indeed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|