Veritas-bu

[Veritas-bu] User Directed Backup and Oracle

2004-03-04 11:36:39
Subject: [Veritas-bu] User Directed Backup and Oracle
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Thu, 4 Mar 2004 09:36:39 -0700
Lemme search for our scripts - we've moved away from with a transition to
RMAN but the script is probably still around.

It was a ksh script that used sqlplus and here files to do the SQL for the
DB tablespace & file information.  We scheduled it daily using cron.

The unix files were indeed sent to tape using bpbackup and the "-f filelist"
option.  The control file to trace writes to a consistent location with a
dependable filename.  It's just a matter of searching the directory for the
correct trace file and sending it.  If you want to get tricky, if the DB is
large, you can break the filelist into sets with the "split" command and
using multiple bpbackup commands to multi-stream data.  Be sure to use the
-w flag on bpbackup to keep the script from moving on and taking the
tablespace out of hot-backup before the file sending is complete.  For the
multistream trick, you have to background the 'bpbackup -w' command, then
loop with the "jobs" command until all the background processes are
complete.

The log files are the most difficult.  We did it by creating a file with a
specific timestamp using the "touch" command.  We generated a timestamp for
it using the GNU date command that lets you generate a date with a specific
offset.  

You could do it with at the beginning of the script by creating a dummy file
with a timestamp equivalent to the script start time minus some safety
offset, say 2 hours depending on your archived redo creation rate.  Then use
the find command with the "-newer <touchfile>" to find all "*.arc" files
newer than your touchfile.  Write the list to a file and send it with
"bpbackup" and the "-f" flag.

HTH - M

-----Original Message-----
From: Paul Esson [mailto:paul.esson AT redstor DOT com]
Sent: Thursday, March 04, 2004 8:15 AM
To: Donaldson, Mark
Subject: RE: [Veritas-bu] User Directed Backup and Oracle


Mark,
 
Could you share example scripts with me so that I can understand what has to
be set-up.  In particular, is the file list written to a file that is then
used as an argument to bpbackup with the -f flag?  When you describe the
loop is this in the context of a UNIX shell script or is this internal to
Oracle?  As for the control files and logs, how do you build those file
lists for bpbackup? 
 
Regards,
 
Paul Esson
 

        -----Original Message----- 
        From: Donaldson, Mark [mailto:Mark.Donaldson AT experianems DOT com] 
        Sent: Wed 03/03/2004 21:32 
        To: 'ckstehman AT pepco DOT com'; Paul Esson 
        Cc: veritas-bu AT mailman.eng.auburn DOT edu;
veritas-bu-admin AT mailman.eng.auburn DOT edu 
        Subject: RE: [Veritas-bu] User Directed Backup and Oracle
        
        
        The method below works but you should be aware that if every
tablespace in the DB is in hot backup mode at the same time, all writes are
queued to the redo logs and a busy DB will slow to a crawl and go though
redo space in a big hurry.
         
        Another method to do a hot backup is:
         
        Query DB for all tablespace names
        for each tablespace in tablespace_list
          set tablespace in hotbackup mode
          query DB for list of Unix files in tablespace
          send files via bpbackup to tape
          unset tablespace
        loop for next tablespace
        Then:
          backup control files to trace - send them to tape
          roll your redo to archived redo
          send all archived redo logs from start of backup time end of
backup time to tape
         
        The set of archived redo logs combined with the file backups are
recoverable by first restoring the files then rolling the files forward to a
consistent point in time using the set of archived redo logs.  This method
will also queue writes to redo but only for the tablespace that's in
Hotbackup mode at the time of the write activity.
         
        DB never goes down.
         
        -M

                -----Original Message-----
                From: ckstehman AT pepco DOT com [mailto:ckstehman AT pepco DOT 
com]
                Sent: Wednesday, March 03, 2004 8:46 AM
                To: Paul Esson
                Cc: veritas-bu AT mailman.eng.auburn DOT edu;
veritas-bu-admin AT mailman.eng.auburn DOT edu
                Subject: Re: [Veritas-bu] User Directed Backup and Oracle
                
                

                Paul, 
                
                You can use the BPSTART_NOTIFY and BPEND_NOTIFY feature to
have DBA Shutdown and backup scripts and 
                have Netbackup run the backup, and then call scripts to
restart the database.   
                We use thisfeature to perform hot backups of some of our
Oracle databases. 
                
                The BPSART_NOTIFY script calls a job to put the tablespaces
in backup mode, then runs the backup policy, 
                when the backup policy is complete, the BPEND_NOTIFY script
is called to take the tablspaces out of backup 
                mode and return things to normal. We do this for databases
that have archivelog mode turned on. 
                
                In your case, you could use this same process to do what you
are describing to call your DBA scripts to set up the flat files, 
                then have the standard policy backup the files, then the
bpend could call any further scripts to restart the database, etc. 
                
                The advantage to this bpend/bpstart featuer is that the
backups 
                are scheduled from the master server and you do not need a
cron job to run the backups. 
                
                I can send you copies of our scripts if you like.   
                
                
                =============================
                Carl Stehman
                PHI Services Company
                202-331-6619
                Pager 301-765-2703
                ckstehman AT pepco DOT com 
                
                
                
                
        "Paul Esson" <paul.esson AT redstor DOT com> 
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu 

03/03/2004 08:22 AM 


        
        To:        <veritas-bu AT mailman.eng.auburn DOT edu> 
        cc:         
        Subject:        [Veritas-bu] User Directed Backup and Oracle    



                Folks,
                
                I am trying to establish policies and schedules to enable me
to backup Oracle databases in the following manner and wanted to know if
this is a sensible approach. Any constructive comments would be much
appreciated.  Unfortunatley, my scripting skills are failrly basic.
                
                NetBackup Version 4.5 FP6
                Master Server Windows 2000
                Oracle clients Solaris 2.6 and 8
                
                We do not want to use RMAN and the NetBackup Oracle
Extension because we want to keep the costs down and simplify the restore
process to recovering flat files.  The DBA has scripted routines to backup
the databases to flat files and place those files in a specific directory
and I was thinking I could set-up automated schedules for fulls and
incrementals that would control the backup frequency and corresponding user
backup schedules that would backup the flat files.  The user backup schedule
would run a script via its file list that is a wrapper for the DBA's script
that calls the bpbackup command afterwards to backup the flat files to
NetBackup.
                
                Can I do this with a standard policy type?  I have see
something similar for an Oracle policy type where a wrapper script calls
RMAN.  Does anyone have anything similar they could share with me?
                
                I have an additional issue where a database resident on a
UNIX client needs to be backed up in unison with a filestore on a Windows
2000 client.  Is there any way I can relate the two activities and control
them through NetBackup?  The logic would have to be something like:
                
                
                *                 Shutdown UNIX databases
                *                 Run DBA script to backup UNIX databases
                *                 Run NetBackup backup of  UNIX database
backup flat files
                *                 Run NetBackup backup of Windows filestore
[ideally if this could be run in parallel with above after database
shutdown]
                *                 Start UNIX database
                
                I need to keep the database down while the filestore is
backed up for consistency.  I may even need to stop a service on the Windows
2000 system before commencing the filestore backup.  AM I chasing shadows
here?
                
                Regards,
                
                Paul Esson
                
                
                _______________________________________________
                Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
                http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
                
                
                
                


<Prev in Thread] Current Thread [Next in Thread>