Unix Backup & Recovery provides a complete overview of all facets of Unix backup and recovery, and offers practical, affordable backup and recovery solutions for environments of all sizes and budgets. The book begins with detailed explanations of the native backup utilities available to the Unix administrator, and ends with practical advice on choosing a commercial backup utility. This book:
Describes the features, limitations, and syntax of Unix backup and restore utilities,(including dump, tar, cpio, dd, GNUtar, and GNUcpio) for many popular versions of Unix, including AIX, Compaq Unix, HP-UX, IRIX, SCO, Solaris, and Linux
Provides instructions for installing and configuring freely available backup systems such as AMANDA
Includes ready-to-run shell scripts that automate live backups of Informix, Oracle, and Sybase databases
Presents step-by-step recovery procedures for Oracle, Informix, and Sybase
Presents step-by-step "bare-metal" disaster recovery procedures for AIX, Compaq Unix, HP-UX, IRIX, Solaris, and Linux
Describes the design of "disaster recovery" and "highly available" systems
Provides guidance on choosing a commercial backup and recovery system
Describes the features and limitations of backup hardware
Table of Contents
Unix Backup and Recovery
- I Wish I Had This Book
- Only the Recovery Matters
- Products Change
- Backing Up Databases Is Not That Hard
- Bare-Metal Recovery Is Not That Hard
- The Scripts in This Book Actually Work
- How This Book is Organized
- How to Contact Us
- This Book Was a Team Effort
1. Preparing for the Worst
- My Dad Was Right
- Developing a Disaster Recovery Plan
- Step 1: Define (Un)acceptable Loss
- Step 2: Back Up Everything
- Step 3: Organize Everything
- Step 4: Protect Against Disasters
- Step 5: Document What You Have Done
- Step 6: Test, Test, Test
- Put It All Together
2. Backing It All Up
- Don’t Skip This Chapter!
- Why Should You Read This Book?
- How Serious Is Your Company About Backups?
- You Can Find a Balance
- Deciding What to Back Up
- Deciding When to Back Up
- Deciding How to Back Up
- Storing Your Backups
- Testing Your Backups
- Monitoring Your Backups
- Following Proper Development Procedures
- Unrelated Miscellanea
- Good Luck
- 1. Preparing for the Worst
II. Freely Available Filesystem Backup & Recovery Utilities
3. Native Backup & Recovery Utilities
- An Overview
Backing Up with the dump Utility
- Syntax of the dump Command
The Options to the dump Command
- Option: specifying a complete or incremental backup (0-9)
- Option: specifying a blocking factor (b)
- Option: updating the dumpdates file (u)
- Option: notifying your backup operators (n)
- Option: specifying density and size ( d and s)
- Do I have to use the s and d options?
- Option: specifying a backup device file ( f )
- Option: displaying which filesystems need to be backed up (W and w)
- Other options: interesting options for Solaris’s ufsdump utility
- What a dump Backup Looks Like
- Automating Your dump Backups: The hostdump.sh Utility
Restoring with the restore Utility
- Is the Backup Volume Readable?
- Blocking Factor
- Byte-Order Differences
- Different Versions of dump
- Syntax of the restore Command
The Options to the restore Command
- Determining the type of restore
- Determining how the restore behaves
- Option: creating a dump volume table of contents (t)
- Option: performing a complete (recursive) filesystem restore (r)
- Option: restoring files by name (x)
- Option: restoring files interactively (i)
- Option: restoring files to another location
- Option: requesting verbose output (v)
- Option: skipping files (s)
- Option: specifying a blocking factor ( b )
- Option: specifying a backup drive or file ( f )
- Option: specifying no query during restore ( y)
- Limitations of dump and restore
- Features to Check For
Backing Up and Restoring with the cpio Utility
- Syntax of cpio When Backing Up
The Options to the cpio Command
- Option: specifying the output mode (o)
- Option: restoring access times (a)
- Option: specifying the ASCII format (c)
- Option: requesting verbose output (v)
- Option: specifying a blocking factor of 5120 (B)
- Option: specifying an I/O block size (C)
- Option: Specifying an output device or file (O)
- Backing up to a remote device (piping to an rsh command)
- Restoring with cpio
- cpio’s Restore Options
- Telling cpio Which Device to Use
- Examples of a cpio Restore
- Using cpio’s “Directory Copy” Feature
Backing Up and Restoring with the tar Utility
- Syntax of tar when Backing Up
- The Options to the tar Command
- Syntax of tar When Restoring
- Some Other Neat Things About tar
Backing Up and Restoring with the dd Utility
- Basic dd Options
- Using dd to Copy a File or Raw Device
- Using dd to Convert Data
- Using dd and rsh (or ssh) as a Conduit Between Systems
- Using dd to Determine the Block Size of a Tape
- Using dd to Figure out the Backup Format
- Comparing tar, cpio, and dump
How Do I Read This Volume?
- Prepare in Advance
- Wrong Media Type
- Bad or Dirty Drive
- Different Drive Types
- Wrong Compression Setting/Type
- The Little Endian That Couldn’t
- Block Size (Tape Volumes Only)
- Unknown Backup Format
- Different Backup Format
- Damaged Volume
- Multiple Partitions on a Tape
- If at First You Don’t Succeed . . .
4. Free Backup Utilities
- The hostdump.sh Utility
- The infback.sh, oraback.sh, and syback.sh Utilities
- A Really Fast tar Utility: star
- Recording Configuration Data: The SysAudit Utility
- Displaying Host Information: The SysInfo Utility
- Performing Remote Detections: The queso Utility
- Mapping Your Network: The nmap Utility
- AMANDA Features
- Future Capabilities of AMANDA
- AMANDA Resources
- Installing AMANDA
- Decide on a tape server
- Decide which tape devices to use
- Decide whether to use compression
- Decide where the holding space will be
- Compute your dump cycle
- Copy and edit the default configuration file
- Configure the holding disk
- Configure tape devices and label tapes
- Configure backup clients
- Test and debug setup
- Operating AMANDA
- Advanced AMANDA Configuration
- Restoring with AMANDA
- 3. Native Backup & Recovery Utilities
III. Commercial Filesystem Backup & Recovery Utilities
5. Commercial Backup Utilities
- What to Look For
- Full Support of Your Platforms
- Backup of Raw Partitions
- Backup of Very Large Filesystems and Files
- Simultaneous Backup of Many Clients to One Drive
- Simultaneous Backup of One Client to Many Drives
- Data Requiring Special Treatment
- Storage Management Features
- Reduction in Network Traffic
- Support of a Standard or Custom Backup Format
- Ease of Administration
- Ease of Recovery
- Protection of the Backup Index
- Volume Verification
6. High Availability
- What Is High Availability?
- HA Building Blocks
- Commercial HA Solutions
- The Impact of an HA Solution
- 5. Commercial Backup Utilities
IV. Bare-Metal Backup & Recovery Methods
- 7. SunOS/Solaris
- How It Works
- A Sample Bare-Metal Recovery
- 9. Compaq Tru64 Unix
- HP’s make_recovery Utility
- The copyutil Utility
- Using dump and restore
- 11. IRIX
- IBM’s mksysb Utility
- IBM’s Sysback/6000 Utility
- System Cloning
V. Database Backup & Recovery
13. Backing Up Databases
- Can It Be Done?
- Confusion: The Mysteries of Database Architecture
- The Muck Stops Here: Databases in Plain English
- What’s the Big Deal?
- The Power User’s View: Logical Elements of a Database
- The DBA’s View: Physical Elements of a Database Environment
- An Overview of a Page Change
- What Can Happen to an RDBMS?
- Backing Up an RDBMS
- Restoring an RDBMS
- Documentation and Testing
- Unique Database Requirements
14. Informix Backup & Recovery
- Power User’s View
- DBA’s View
- I’m Confused by All the Logging!
- Automating Informix Startup: The dbstart.informix.sh Script
- Protect the Physical Log, Logical Log, and sysmaster
- Which Backup Utility Should I Use?
Physical Backups Without a Storage Manager: ontape
- Configuring ontape
- Tape or Disk?
- Backing Up the Instance
- Backing Up the Logical Logs
Automating Archives with ontape: the infback.sh Utility
- Why automating ontape is difficult
- How infback.sh works
- When infback.sh runs
- If infback.sh is called with no arguments
- If infback.sh is called with arguments specifying backup parameters
- If infback.sh is called with at as the first argument
- The backup begins
- Installing infback.sh and its configuration files
- Editing the infback.sh configuration files
- Centralized configuration
- Scheduling backups
- Why Automating Continuous Backups Is Difficult
- Automating Continuous Backups: the rclogs.sh Utility
- Using the Scripts Together
- Physical Backups with a Storage Manager: onbar
- Step 1: Does oninit Work?
- Step 2: Is the onconfig File Missing?
- Step 3: Restore or Re-create the onconfig File
- Step 4: Is There an Inaccessible or Critical Chunk?
- Step 5: Repair or Replace the Missing Chunk
- Step 6: Performing a Cold Restore
- Step 7: Are There Errors in the Online Log?
- Step 8: Is There an Inaccessible Noncritical Chunk?
- Step 9: Is There a Corrupted Noncritical Chunk?
- Step 10: Perform a dbspace Restore
- Step 11: Are There Wrong Values in the onconfig File?
- Step 12: Change the Bad Values in the onconfig File
- Step 13: Ensuring That the Instance Will Restart
- Step 14: Taking the Instance Offline
- Step 15: Confirming That dbspaces and Chunks Are Online
- Step 16: Recovering a Deleted Table or Database
- Step 17: Performing a Point-in-Time Restore
- Step 18: Is Everything OK?
- Step 19: Making a Backup
- Logical Backups
- Informix Architecture
15. Oracle Backup & Recovery
- Oracle Architecture
Physical Backups Without a Storage Manager
- Cold Backup
- Hot Backup
- Inside a Hot Backup
- Automating Backups: The oraback.sh Script
Physical Backups with a Storage Manager
- Vendor-Supplied Storage Managers
- Oracle Storage Managers
- Difficulties with rman
- Managing the Archived Redologs
- Using This Recovery Guide
- Step 1: Try Startup Mount
- Step 2: Are All Control Files Missing?
- Step 3: Replace Missing Control File
- Step 4: Are All Datafiles and Redologs OK?
- Step 5: Recover Damaged Datafiles or Redologs
- Step 6: Is There a create controlfile Script?
- Step 7: Run the create controlfile Script
- Step 8: Restore Control Files and Prepare the Database for Recovery
- Step 9: Recover the Database
- Step 10: Does “alter database open” Work?
- Step 11: Damaged System File?
- Step 12: Restore All Datafiles in the SYSTEM Tablespace
- Step 13: Damaged Nonsystem Datafile?
- Step 14: Take Damaged Datafile Offline
- Step 15: Were Any Datafiles Taken Offline?
- Step 16: Bring Datafile(s) Back Online
- Step 17: Is There a Damaged Log Group?
- Step 18: Are Any Rollback Segments Unavailable?
- Step 19: Does the Database Need to Be at Least Partially Up ASAP?
- Step 20: Recover Tablespace Containing Unavailable Rollback Segment
- Step 21: Comment Out Rollback Segment Line(s) in the init.ora File
- Step 22: Is the Current Online Log Damaged?
- Step 23: Recover All Database Files from Backup
- Step 24: alter database open resetlogs
- Step 25: Is an Active Online Redolog Damaged?
- Step 26: Perform a Checkpoint
- Step 27: Is an Inactive Online Redolog Damaged?
- Step 28: Drop/Add a Damaged, INACTIVE Log Group
- Step 29: Were Any Rollback SegmentLines Changed in init.ora?
- Step 30: Return Offline Rollback Segments to Normal Condition
- You’re Done!
- Logical Backups
- A Broken Record
16. Sybase Backup & Recovery
- The Power User’s View
- The DBA’s View
- Protecting Your Database
- Physical Backups Without a Storage Manager
- Physical Backups with a Storage Manager
- Restoring from a Cold Backup
- Restoring from a Hot Backup
- Using the Recovery Procedure
- Step 1: Runfile OK?
- Step 2: Restore or Re-create Runfile
- Step 3: Able to Get Shared Memory?
- Step 4: Free Up Shared Memory or Reconfigure Memory in Configuration File
- Step 5: Able to Connect to Data Server?
- Step 6: Check Interface File
- Step 7: Master Database Initialized?
- Step 8: Master Device/File Missing?
- Step 9: Restoring Generic Master Database
- Step 10: Recent Dump of Master Database?
- Step 11: Restore Master from Dump
- Step 12: Update Number of Devices in the Configuration
- Step 13: Restore System Tables Using disk reinit and disk refit
- Step 14: sybsystemprocs Available?
- Step 15: Problem with Data Devices?
- Step 16: Replace Device/Disk File
- Step 17: Restore Base sybsystemprocs from sybsystemprocs Script
- Step 18: Recent Dump of Database?
- Step 19: Restore from Dump
- Step 20: Is tempdb Available?
- Step 21: Model Database Available?
- Step 22: Re-create Generic Model Database
- Step 23: All Databases Online?
- Step 24: Contact Sybase Support
- Step 25: Reapply Any Additional Scripts or bcps
- Step 26: Review Against Hardcopies
- Step 27: Dump all Restored Databases
- Logical Backups
- An Ounce of Prevention . . .
- Sybase Architecture
- 13. Backing Up Databases
VI. Backup & Recovery Potpourri
17. ClearCase Backup & Recovery
- ClearCase Architecture
VOB Backup and Recovery Procedures
- VOB Backup Strategies
- Other VOB Backup Issues
- VOB Recovery
- View Backup and Recovery Procedures
18. Backup Hardware
- Choosing on a Backup Drive
- Using Backup Hardware
- Linear Versus Helical Scan
- Cartridges Versus Cassettes
Tape Drive Technologies
- 3480/3490/3490E drives
- 8-mm drives
- AIT drive
- Ampex DST drive
- DDS drive
- The DLT drive
- Exabyte Mammoth drive
- IBM Magstar MP (3570) drive
- IBM Magstar 3590 drive
- LTO drive
- Metrum line of drives
- Plasmon LMS NCTP drive
- Sony DTF drive
- The Storagetek 9840 (Eagle) drive
- The Storagetek Redwood SD-3 drive
- The Tandberg MLR 1-3 drive
- Optical Recording Methods
- CD Recording Formats
- DVD Recording Formats
- Magneto-Optical Recording Formats
- For More Information
- Automated Backup Hardware
- Hardware Comparison
- Volatile Filesystems
- Demystifying dump
- Gigabit Ethernet
- Disk Recovery Companies
- Trust Me About the Backups
- 17. ClearCase Backup & Recovery
- Title: Unix Backup and Recovery
- Release date: November 1999
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 1565926420