Re: RMAN incremental backup

From: Jared Still <jkstill_at_gmail.com>
Date: Sat, 11 Dec 2010 23:13:00 -0800
Message-ID: <AANLkTimacqXJgQemDpsmYce_MKUCCA4pZshkuGfALhu6_at_mail.gmail.com>



Some comments inline:

On Fri, Dec 10, 2010 at 11:11 AM, Wayne Smith <wts_at_maine.edu> wrote:

> In practice, your production script cannot be "very simple", for there are
> lots of additional concerns you might deal with ...
>

Agreed.

>
> - You'll probably want to embed or determine the ORACLE_SID to be used
> (and perhaps determine the ORACLE_HOME from oratab or oraenv), setting these
> environment variables.
>
>

"probably want" probably means "required"

>
> - You'll probably want to log the outputs of RMAN and perhaps gather
> other information or do other tasks in this script, such as management of
> the catalog/control file information. This may include a log rotation
> system to make several recent run logs available.
>
> Good advice here.

You won't need the logging capability until something doesn't work, which is not a good time to start adding debug statements to your script.

> - You will probably want to invoke rman more explicitly, such as
> "$ORACLE_HOME/bin/rman" if on non-windows.
>
> This is required on linux.

23:6-poirot:ts20:jkstill-0 > which rman
rman is /usr/X11R6/bin/rman

>
> - If you use something such as the NetBackup Agent for Oracle, then
> invocations of your script may not be using "oracle" or have any of your
> normal environment setup, as well as may have a number of variables set to
> help you tailor the backup.
>
> In addtion, NetBackup passes a number of environment variables
that can be used to control the script for various types of backups. Full/Incremental and archive logs for instance.

I would agree that robust RMAN shell scripts are not terribly simple. They don't have to be overly complex, but really good ones take some thought and preparation.

My own short list of requirements (linux/unix):

  • scripts should never require changes for different databases. configuration should be done via a config file.
  • minimize the amount of code needed in the main scripts by putting repetitive tasks in a functions.sh file that is loaded by the scripts.
  • logging, trace and debugging output should be easily enabled (ie. no editing of the script required)

This makes for robust and reusable scripts.

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Dec 12 2010 - 01:13:00 CST

Original text of this message