- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- create a script to delete old Oracle archive log f...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 01:04 AM
тАО11-16-2004 01:04 AM
Thanks in advance for your help!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 01:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 01:12 AM
тАО11-16-2004 01:12 AM
Re: create a script to delete old Oracle archive log files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:08 AM
тАО11-16-2004 06:08 AM
Re: create a script to delete old Oracle archive log files
find prod*.arc -type f -mtime +14 -exec rm{}\;
Results: find: -exec not terminated with ';'
What did I do wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:10 AM
тАО11-16-2004 06:10 AM
Re: create a script to delete old Oracle archive log files
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:17 AM
тАО11-16-2004 06:17 AM
Re: create a script to delete old Oracle archive log files
find prod*.arc -type f -mtime +14 -exec rm{ } \;
Results: Missing }.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:19 AM
тАО11-16-2004 06:19 AM
Re: create a script to delete old Oracle archive log files
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:31 AM
тАО11-16-2004 06:31 AM
Re: create a script to delete old Oracle archive log files
31 14 find /testing1/arch-prod/prod*.arc -type f -mtime +14 -exec rm{ } \;
crontab: error on previous line; unexpected character found in line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:35 AM
тАО11-16-2004 06:35 AM
Re: create a script to delete old Oracle archive log files
find /testing1/arch-prod -name 'prod*.arc' -type f -mtime +14 -exec rm{ } \;
instead.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:37 AM
тАО11-16-2004 06:37 AM
Re: create a script to delete old Oracle archive log files
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:44 AM
тАО11-16-2004 06:44 AM
Re: create a script to delete old Oracle archive log files
I ran this command manually, my results were "Usage: rm [-Rfir] file ..."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:50 AM
тАО11-16-2004 06:50 AM
Re: create a script to delete old Oracle archive log files
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 06:57 AM
тАО11-16-2004 06:57 AM
Re: create a script to delete old Oracle archive log files
find /testing1/arch-prod -name 'prod*.arc' -type f -mtime +14 -exec rm {} \;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 07:04 AM
тАО11-16-2004 07:04 AM
Re: create a script to delete old Oracle archive log files
I used this command and it works. Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 07:18 AM
тАО11-16-2004 07:18 AM
Re: create a script to delete old Oracle archive log files
Just so you know, the way you have the command, it's going to delete every file in /testing1/arch-prod/ that's older than 14 days. If the only thing in that directory is archive log files then that's fine. If there are other files located there, you're going to want to specify exactly what you want to delete with the -name syntax that I've been showing you.
Good luck,
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 07:24 AM
тАО11-16-2004 07:24 AM
Re: create a script to delete old Oracle archive log files
Again, thanks for your help!
Yvette
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 03:39 PM
тАО11-16-2004 03:39 PM
Re: create a script to delete old Oracle archive log files
It is great to hear/see that the question you asked is answerred. But I can not help but wonder whether you asked the right question.
The validity / usefulness of Oracle archive logs is only indirectly a function of their age. The real decision whether you can delete an archive log is
1- whether it is moved to more permanent storage
2- whether a fresh full backup was made in teh mean time.
If your main backup is 16 days old, then you will need those archive logs from day 14 and 15 in order to be able to recover.
Conversely, if your main backup is 7 days old, then all archives older than 8 days are useless.
I hope that your archive cleaning is carefully integrated with your backup procedures!
Mind you I have never ever actually had to set this up, but if I had to, then I would probably rename my archive log directory to a date-stamped one whenever i made a new full backup, and create a fresh empty directory. And when/if I roll them out to tape/optical storage then I'd rename them into yet another 'archived' directory. In doing so the directories would tell me what can safely be deleted, not the ages of the file.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2004 07:03 AM
тАО11-17-2004 07:03 AM