Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Archives > 1996 > 9607

Oracle Database Backup

Curtis Preston

See Sidebar 1

See Sidebar 2

Trying to back up today's databases is like trying to catch a charging rhino with a butterfly net. Real world databases have become screaming behemoths that are very difficult to capture (back up), and standard UNIX utilities are like butterfly nets. If you try to use these utilities for the job, not only will you not capture the data -- you'll break your arm! This article is my attempt to build a better rhino trap. It uses many advanced shell scripting features, so you may find it useful even if you do not have Oracle.

Hot or Cold Backups?

One of the first decisions a database administrator must make is whether to perform "cold" or "hot" backups. A cold backup involves:

1. Shutting down the instance 2. Backing up its filesystems or raw devices 3. Starting up the instance

Here are the steps to perform a hot backup. (Note that a hot backup requires much more knowledge of Oracle's internal structure, so a basic definition of helpful terms is given in the sidebar "Definitions.") First, you must determine the name of each tablespace in the instance and the files that are within it. Then, for each tablespace, you:

1. Put that tablespace in backup mode; 2. Backup that tablespace's files or raw partitions (using cp, tar, dd, etc.); 3. Take that tablespace out of backup mode.

Once all tablespaces are done:

1. Switch redolog files; and 2. Backup the control file.

It is much easier to perform cold backups, so why do hot backups at all? Simply stated, they increase your backup window, or the time in which you are allowed to perform backups. Because cold backups require a shutdown of the database, your users will probably allow only a very small backup window.




MarketPlace

Instant Answers to Your IT & Business Questions
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.

BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.

Discover WinDev 11 RAD
and develop 10 times faster ! ALM, IDE, .Net, PDF, 5GL, Database, 64-bit, etc. Free Express version

Wanna see your ad here?