Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: erasing Archive log

Re: erasing Archive log

From: Big Al <db-guru_at_att.net>
Date: Fri, 15 Sep 2000 21:10:52 GMT
Message-ID: <39C28FEF.B456E9E9@att.net>

> "Big Al" <db-guru_at_att.net> wrote in message
> > At one company where I installed their first Oracle system (on NT), I
> > set up scripts to zip the previous days backups (both datafiles and
> > archive logs) so that they would have enough room to store a weeks worth
> > on disk without resorting to tape. That left the current backup and
> > archive logs on disk, 6 days of zipped backups on disk, and nightly
> > network backups of all disk contents including the backups. I believe
> > in redundancy for backups.
> >
> > Big Al

"Howard J. Rogers" wrote:
>
> Brilliant idea, Al. I don't suppose you could share such scripts, huh? For
> sharing with the rest of the world?
>
> Just a thought.
>
> Regards
> HJR
I would if I could. This client would let me publish them, but my corporate laptop had a problem and I got a new one. I keep almost everything in one directory with many sub directories, but for this client I had a separate directory so I could keep it in sync with a copy on their LAN and I forgot to move it to my new laptop. For a little more detail, this is the initial strategy that I presented to the client for a quick start. This was the client's very first server based dbms. Sorry I don't have the scripts anymore. FYI, Info ZIP was used because it is available for many platforms in case the client had a UNIX server in the future. It has the same basic algorithm as Phil Katz's PKZIP. You can find them on the web.

Big Al

        Initial Oracle Backup Implementation

 This is an outline for an initial Oracle backup implementation. It is intended to be easy to implement, but it is not meant to be the permanent solution. For ease of use the exact same implementation will be performed on all Oracle instances. All Oracle instances will be placed in ARCHIVELOGMODE regardless of whether point in time recovery is necessary or not. As <client name> gets more familiar with Oracle backup and recovery this plan can be customized to meet differing requirements for each server or instance.

The steps involved in the initial backup implementation are:

· Shutdown the Oracle instance with a SHUTDOWN IMMEDIATE
· Copy all Oracle datafiles to the ora_backups/<sid>/datafiles directory
· Delete all archive logs more than one day old from the
ora_backups/<sid>/archivelogs directory · Compress the ora_backups/<sid> directory and all sub-directories to a zip files
· Initially there will be a separate zip file for each day of the week if space permits
· This can be changed to date identified zip files to allow greater retention at a later date
· Startup Oracle
· Copy the zip files to tape or another backup media

Here are some procedures for performing the above steps.

Create Scripts

· Build backup scripts in d:\ora_backups\scripts on the server · Copy <sid>up.cmd, <sid>down.cmd, <sid>copy.cmd, and <sid>bkup.bat and rename <sid>
· Change instance names and passwords in the startup and shutdown scripts
· Check for the Oracle release in the scripts (use program oradim73 for Oracle 7.3)
· Make sure the backup directories for that <sid> were created with the instance
· Modify the copy scripts to point to all the directories with files for the <sid>
· Test each .cmd script separately for functionality and together in the <sid>bkup.bat script

Turn on NT Scheduling

· Start the Schedule service in the NT control panel · Change the Schedule service startup to automatic

Schedule Backup Scripts

· Run a test of the backup script for timing purposes · Schedule the backups with either the at command or interactively with the NT Resource kit
· example of running a script every weekday at 10:00 P.M.

        at 22:00 /every:M,T,W,Th,F cmd /c d:\ora_backups\scripts\techbkup.bat · example of running a script every weekday night at 12:05 A.M.

        at 00:05 /every:T,W,Th,F,S cmd /c d:\ora_backups\scripts\techbkup.bat · Initially, we will schedule the backups after midnight to make the archive log cleanup easier

Compress Files with Info_Zip

It's easiest if your position is in the parent directory of the directory (and sub-directories) that you want to zip. Z:\DATA\Ora_backups>c:\als_data\infozip\zip -o -q -r tech_bkup_fri.zip tech -x *.zip
Options used are: -o make the zipfile as old as the latest entry that was compressed

		 -q    quiet operation (no messages)
		 -r     recurse through all sub-directories and files
		 -x    explicitly exclude files that meet the specified criteria (in
this case all .zip files)

 Copy Files to tape with NTBACKUP

ntbackup backup d:\ora_backups /b /hc:on /t copy /l oracle_servername /tape:0 Received on Fri Sep 15 2000 - 16:10:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US