Backup & Recovery

Book description

Packed with practical, freely available backup and recoverysolutions for Unix, Linux, Windows, and Mac OS X systems -- as wellas various databases -- this new guide is a complete overhaul ofUnix Backup & Recovery by the same author, now revisedand expanded with over 75% new material.

Backup & Recovery starts with a complete overview ofbackup philosophy and design, including the basic backup utilitiesof tar, dump, cpio, ntbackup, ditto, and rsync. It then explainsseveral open source backup products that automate backups usingthose utilities, including AMANDA, Bacula, BackupPC, rdiff-backup,and rsnapshot. Backup & Recovery then explains how toperform bare metal recovery of AIX, HP-UX, Linux, Mac OS, Solaris,VMWare, & Windows systems using freely-available utilities. Thebook also provides overviews of the current state of the commercialbackup software and hardware market, including overviews of CDP,Data De-duplication, D2D2T, and VTL technology. Finally, it covershow to automate the backups of DB2, Exchange, MySQL, Oracle,PostgreSQL, SQL-Server, and Sybase databases - without purchasing acommercial backup product to do so.

For environments of all sizes and budgets, this unique bookshows you how to ensure data protection without resorting toexpensive commercial solutions. You will soon learn to:

  • Automate the backup of popular databases without a commercialutility

  • Perform bare metal recovery of any popular open systemsplatform, including your PC or laptop

  • Utilize valuable but often unknown open source backupproducts

  • Understand the state of commercial backup software, includingexplanations of CDP and data de-duplication software

  • Access the current state of backup hardware, including VirtualTape Libraries (VTLs)

  • Publisher resources

    View/Submit Errata

    Table of contents

    1. Preface
      1. I Wish I’d Had This Book
        1. Only the Recovery Matters
        2. Products Change
        3. Backing Up Databases Is Not That Hard
        4. Bare-Metal Recovery Is Not That Hard
      2. How This Book Is Organized
        1. Part I
        2. Part II
        3. Part III
        4. Part IV
        5. Part V
        6. Part VI
      3. What’s New in This Book
      4. What’s Missing?
      5. Speaking of BackupCentral.com
      6. Conventions Used in This Book
      7. How to Contact Us
      8. O’Reilly Safari®
      9. This Book Was a Team Effort
        1. Contributors
        2. Technical Editors
        3. Horror Stories
        4. Special Mention
        5. I Don’t Know It All
        6. How Can I Say Thanks?
    2. 1. Introduction
      1. 1. The Philosophy of Backup
        1. Champagne Backup on a Beer Budget
        2. Why Should I Read This Book?
          1. Schadenfreude
          2. You Never Want to Say These Words
          3. You’re Curious About Open-Source Backup Products
          4. You Want to Learn About Disk-Based Backup
        3. Why Back Up?
          1. What Will Lost Data Cost You?
          2. What Will Downtime Cost You?
        4. Wax On, Wax Off: Finding a Balance
          1. Don’t Go Overboard
          2. Get the Coverage That You Need
          3. Why the Word “Volume” Instead of “Tape”?
      2. 2. Backing It All Up
        1. Don’t Skip This Chapter!
          1. The Impossible Job That No One Wants
        2. Deciding Why You Are Backing Up
        3. Deciding What to Back Up
          1. Plan for the Worst
          2. Take an Inventory
          3. Are You Backing Up What You Think You’re Backing Up?
          4. Back Up All or Part of the System?
            1. Backing up only selected drives or filesystems
            2. Backing up the entire system
        4. Deciding When to Back Up
          1. Backup Levels
          2. Which Levels Do You Run and When?
            1. Weekly schedule: All full/level 0 backups
            2. Weekly schedule: Weekly full, daily level differentials/level 1s
            3. Weekly schedule: Weekly full, daily leveled backups
            4. Weekly schedule: Monthly full, daily Tower of Hanoi incrementals
          3. “In the Middle of the Night...”
        5. Deciding How to Back Up
          1. Be Ready for Anything: 10 Types of Disasters
          2. Automate Your Backup
          3. Plan for Expansion
          4. Don’t Forget Unix mtime, atime, and ctime
            1. Backups change atime
            2. The atime can be reset—with a penalty
          5. Don’t Forget ACLs
          6. Don’t Forget Mac OS Resource Forks
          7. Keep It Simple, SA
        6. Storing Your Backups
          1. Storage in General
          2. On-Site Storage
            1. 12,000 gold pieces
          3. Off-Site Storage
            1. Choosing a media vaulting vendor
            2. Testing your chosen vendor
            3. Electronic vaulting
        7. Testing Your Backups
          1. Test Everything!
          2. Test Often
        8. Monitoring Your Backups
          1. You Can Always Make It Better
          2. If It’s Not Baroque, Don’t Fix It
        9. Following Proper Development Procedures
        10. Unrelated Miscellanea
          1. Protect Your Career
            1. Self-preservation: Document, document, document
            2. Strategy: Make backups an integral part of the installation process
          2. Get the Money Your Backups Need
            1. Be ready
            2. Make a formal presentation
        11. Good Luck
    3. 2. Open-Source Backup Utilities
      1. 3. Basic Backup and Recovery Utilities
        1. An Overview
          1. How Mac OS Filesystems Are Different
          2. cpio
            1. Why isn’t cpio more popular?
          3. ditto
          4. dd
          5. dump and restore
          6. ntbackup
          7. rsync
          8. System Restore
          9. tar
          10. Other Utilities
            1. asr
            2. pax
            3. psync, rsyncx, hfstar, xtar, and hfspax
        2. Backing Up and Restoring with ntbackup
          1. Creating a Simple Backup Configuration
          2. Executing Your Simple Backup
          3. Restoring with ntbackup
        3. Using System Restore in Windows
          1. Creating Restore Points
          2. Recovering Windows Using a Restore Point
        4. Backing Up with the dump Utility
          1. Syntax of the dump Command
          2. The Options to the dump Command
            1. Specifying a complete or incremental backup (0–9)
            2. Specifying a blocking factor (b)
            3. Updating the dumpdates file (u)
            4. Notifying your backup operators (n)
            5. Specifying density and size (d and s)
            6. Do I have to use the s and d options?
            7. Specifying a backup device file (f)
            8. Displaying which filesystems need to be backed up (W and w)
            9. Interesting options for Solaris’s ufsdump utility
          3. What a dump Backup Looks Like
            1. dump records an index on the volume
            2. Using the index to create a table of contents
        5. Restoring with the restore Utility
          1. Is the Backup Volume Readable?
          2. Blocking Factor
          3. Byte-Order Differences
          4. Different Versions of dump
          5. Syntax of the restore Command
          6. The Options to the restore Command
            1. Determining the type of restore
            2. Determining how the restore behaves
            3. Creating a dump volume table of contents (t)
            4. Performing a complete (recursive) filesystem restore (r)
            5. Restoring files by name (x)
            6. Restoring files interactively (i)
            7. Restoring files to another location
            8. Requesting verbose output (v)
            9. Skipping files (s)
            10. Specifying a blocking factor (b)
            11. Specifying a backup drive or file (f)
            12. Specifying no query during restore (y)
        6. Limitations of dump and restore
        7. Features to Check For
        8. Backing Up and Restoring with the cpio Utility
          1. The Syntax of cpio When Backing Up
          2. The Options to the cpio Command
            1. Specifying the output mode (o)
            2. Restoring access times (a)
            3. Specifying the ASCII format (c)
            4. Requesting verbose output (v)
            5. Specifying a blocking factor of 5,120 (B)
            6. Specifying an I/O block size (C)
            7. Specifying an output device or file (O)
            8. Backing up to a remote device (piping to an rsh or ssh command)
          3. Restoring with cpio
            1. Different versions of cpio
            2. Byte-order problems
            3. Wrong header type
            4. Strange block size
            5. Full or partial restore, or table of contents only?
          4. cpio’s Restore Options
          5. Telling cpio Which Device to Use
          6. Examples of a cpio Restore
            1. Listing the files on a cpio volume
            2. Doing an entire filesystem restore
            3. Doing a pattern-match restore
            4. Renaming files interactively
            5. Other useful options
            6. Restoring to a different directory
          7. Using cpio’s Directory Copy Feature
        9. Backing Up and Restoring with the tar Utility
          1. The Syntax of tar When Backing Up
          2. The Options to the tar Command
            1. Listing files on standard input
          3. Syntax of tar When Restoring
            1. Restoring selected parts of the archive
            2. Tricking tar into using wildcards during a restore
            3. Changing ownership, permissions, and attributes during a restore
          4. Some Other Neat Things About tar
            1. Finding everything that’s under the directory
            2. Using tar to move a directory
            3. Restoring to an alternate location
        10. Backing Up and Restoring with the dd Utility
          1. Basic dd Options
            1. Specifying the input file
            2. Specifying the output file
            3. Specifying the block size
            4. Specifying the input and output block sizes separately
            5. Specifying the number of records to read
          2. Using dd to Copy a File or Raw Device
          3. Using dd to Convert Data
            1. Converting data to go into another command
            2. Converting data that is in the wrong format
          4. Using dd to Determine the Block Size of a Tape
          5. Using dd to Figure out the Backup Format
        11. Using rsync
          1. Basic rsync Syntax
            1. A few twists
            2. rsync on Windows
            3. rsync on Mac OS
          2. Restoring with rsync
        12. Backing Up and Restoring with the ditto Utility
          1. Syntax of ditto When Backing Up
          2. The Options to the ditto Command
          3. Syntax of ditto when Restoring
            1. Listing the files in a ditto archive
        13. Comparing tar, cpio, and dump
        14. Using ssh or rsh as a Conduit Between Systems
      2. 4. Amanda
        1. Summary of Important Features
          1. Client/Server Architecture Using Nonproprietary Tools
          2. Amanda Security
          3. Holding Disk
          4. Backup Scheduling
          5. Tape Management
          6. Device Management
        2. Configuring Amanda
        3. Backing Up Clients via NFS or Samba
          1. Backing Up Using NFS
          2. Backing Up via Samba
        4. Amanda Recovery
        5. Community and Support Options
        6. Future Plans
      3. 5. BackupPC
        1. BackupPC Features
        2. How BackupPC Works
        3. Installation How-To
          1. Security Versus Ease of Use
          2. Basic Sizing
          3. Installing BackupPC
            1. Installation packages
        4. Starting BackupPC
          1. Using the CGI Interface
          2. Configuration Files
        5. Per-Client Configuration
        6. The BackupPC Community
        7. The Future of BackupPC
      4. 6. Bacula
        1. Bacula Architecture
          1. Bacula Components
          2. Interaction Between Components
            1. Authentication
            2. Configuration
        2. Bacula Features
        3. An Example Configuration
          1. Setting Up the Server
          2. Initial Backup (Linux Client)
          3. Initial Restore (Linux Client)
          4. Windows Backup
          5. Mac OS X Backup
        4. Advanced Features
          1. Bare-Metal Recovery
          2. Backup Traffic and Storage Encryption
          3. Python Script Support
          4. Client Script Support
          5. Autochanger Support
          6. ANSI and IBM Tape Labels
          7. File-Based Intrusion Detection
        5. Future Directions
          1. Pool Migration
          2. Tracking Deleted/Renamed Files
          3. Python-Based GUI Tool
          4. Base Job Support
          5. Client-Initiated Backups
          6. Plug-in Support for File Daemons
      5. 7. Open-Source Near-CDP
        1. rsync with Snapshots
          1. An Example
          2. Beyond the Example
          3. Understanding Hard Links
          4. Hard-Link Copies
            1. A simple example script
          5. Restoring from the Backup
          6. Things to Consider
            1. How large is each backup?
            2. A brief word about mail formats
            3. Other useful rsync flags
            4. Backing up databases or other large files that keep changing
            5. Backing up Windows systems
            6. Large filesystems and rsync’s memory scaling
            7. Atomicity and partial transfers
        2. rsnapshot
          1. Platform Support
          2. When Not to Use rsnapshot
          3. Setting Up rsnapshot
          4. The rsnapshot Community
        3. rdiff-backup
          1. Advantages
          2. Disadvantages
          3. Quick Start
          4. Windows, Mac OS X, and the Future
    4. 3. Commercial Backup
      1. 8. Commercial Backup Utilities
        1. What to Look For
        2. Full Support of Your Platforms
          1. Should You Back Up Special Files?
        3. Backup of Raw Partitions
        4. Backup of Very Large Filesystems and Files
        5. Aggressive Requirements
          1. LAN-Free Backup
          2. Server-Free (or Serverless) Backup
          3. De-Duplication Backup Systems
          4. Snapshots
          5. Replication
          6. Near-Continuous Data Protection Systems
          7. Continuous Data Protection Systems
          8. Remote Office Backup
        6. Simultaneous Backup of Many Clients to One Drive
        7. Disk-to-Disk-to-Tape Backup
        8. Simultaneous Backup of One Client to Many Drives
        9. Data Requiring Special Treatment
          1. Network-Mounted Filesystems
          2. Custom User Scripts
          3. Databases
        10. Storage Management Features
          1. Archives
            1. Backups make lousy archives
            2. Satisfy electronic discovery requests
            3. Other backup bugaboos
            4. True archiving
            5. Two types of archivers
          2. Hierarchical Storage Management
          3. Information Lifecycle Management
        11. Reduction in Network Traffic
          1. Keep Backup Traffic at the Subnet Level
          2. Use Client-Side Compression
          3. Incorporate Throttling
          4. Storage Area Networks
        12. Support of a Standard or Custom Backup Format
          1. Standard Backup Formats
            1. The dump utility
            2. The tar, ditto, and cpio utilities
          2. Custom Backup Formats
            1. What happened to SIDF?
          3. A Reality Check
        13. Ease of Administration
        14. Security
        15. Ease of Recovery
        16. Protection of the Backup Index
        17. Robustness
        18. Automation
        19. Volume Verification
        20. Cost
        21. Vendor
        22. Final Thoughts
      2. 9. Backup Hardware
        1. Decision Factors
          1. Reliability
          2. Duty Cycle
          3. Transfer Speed
          4. Flexibility
            1. Tape drives: Not so flexible
            2. Optical drives: A little more flexible
            3. Disk drives: Very flexible
          5. Time-to-Data
          6. Capacity
          7. Removability
          8. Cost
          9. Summary
        2. Using Backup Hardware
          1. Compression
          2. Density Versus Compression
          3. How Often Should I Change My Media?
          4. Cartridge Care
          5. Drive Care
          6. Nearline and Offline Storage
        3. Tape Drives
          1. Tape Drives Must Be Streamed
          2. Compression Makes It Harder to Stream Drives
          3. Variable Speed Tape Drives
          4. Helical and Linear Tape Drives Are Different
          5. Cartridges Versus Cassettes
          6. Midrange Tape Drive Types
            1. 3480 (end-of-lifed)
            2. 3590
            3. 3592
            4. TS1120
            5. 3570 drive (a.k.a. Magstar MP)
            6. 8 mm (8x0x) drives (end-of-lifed)
            7. 9840 drives
            8. 9940 drives
            9. T10000 drives
            10. AIT drive
            11. DDS drive
            12. DLT drives (end-of-lifed)
            13. DLT-S drives (aka Super DLT)
            14. DLT-V drives (aka Value DLT)
            15. DTF drive
            16. LMS NCTP drive
            17. LTO drives
            18. Mammoth drive (end-of-lifed)
            19. MLR 1-3 drives
            20. VXA
        4. Optical Drives
          1. Optical Recording Methods
            1. Magneto-optical recording method
            2. Phase change recording method
            3. Dye polymer recording method
            4. WORM recording methods
          2. Optical Recording Formats
            1. CD recording formats
            2. DVD recording formats
            3. Magneto-optical recording format
            4. UDO recording format
        5. Automated Backup Hardware
        6. Disk Targets
          1. Disk-As-Disk Targets
            1. Advantages of disk-as-disk targets
            2. Disadvantages of disk-as-disk targets
            3. SAN disk-as-disk targets
            4. NAS disk-as-disk targets
          2. Disk-As-Tape: Virtual Tape Libraries
            1. Advantages of VTLs
            2. Disadvantages of VTLs
            3. How do you eject virtual tapes?
          3. Disk Features to Consider
            1. Packaging
            2. De-duplication
            3. Replication
            4. Content-awareness
            5. Re-presentation
            6. Stacking
            7. Notification
          4. Disk-As-Tape: Virtual Tape Cartridges
    5. 4. Bare-Metal Recovery
      1. 10. Solaris Bare-Metal Recovery
        1. Using Flash Archive
          1. Backup and Recovery Overview
            1. Perform the backup
            2. Perform the restore
          2. Initial Considerations
            1. System requirements
            2. Frequency of backup
            3. Back up to disk or tape?
            4. Restore from tape or disk?
            5. Interactive or noninteractive restore?
            6. Other environmental constraints
        2. Preparing for an Interactive Restore
          1. Creating Flash Archive Images
            1. Determining filesystems to back up
            2. Using flar create
            3. Creating a flash archive tape
          2. Bare-Metal Recovery with Flash Archive
            1. An interactive recovery example
        3. Setup of a Noninteractive Restore
          1. Noninteractive Setup Files
            1. profile
            2. The rules file
            3. The sysidcfg file
          2. Creating a Noninteractive Tape Image
          3. Creating a Noninteractive Disk Image
          4. Post-Recovery Procedures
        4. Final Thoughts
      2. 11. Linux and Windows
        1. How It Works
          1. If Then GOTO
          2. Choosing Backup Methods
            1. Live or alternate boot?
            2. Image level or filesystem level?
            3. Complete disk or separate partitions?
            4. Four backup options
        2. The Steps in Theory
          1. Step 1: Back Up Important Metadata
            1. Linux, FreeBSD, and Solaris x86
            2. Windows
          2. Step 2: Back Up the OS with a Native Utility
            1. Linux, FreeBSD, Solaris X86
            2. Windows
          3. Step 3: Boot the System from Alternate Media
          4. Step 4: Restore the Boot Block Information
          5. Step 5: Partition and Format the New Root Drive
            1. Linux, FreeBSD, and Solaris X86
            2. Windows
          6. Step 6: Restore the OS to the New Root Drive
        3. Assumptions
        4. Alt-Boot Full Image Method
          1. Create the Bare-Metal Backup
            1. Back up the important metadata
            2. Boot the system from alternate media
            3. Back up the operating system with a native utility
          2. Perform a Bare-Metal Recovery
            1. Boot the system from alternate media
            2. Restore the boot block information
            3. Prepare the new root drive
            4. Restore the operating system
        5. Alt-Boot Partition Image Method
          1. Create the Bare-Metal Backup
            1. Back up the important metadata
            2. Boot the system from alternate media
            3. Back up the operating system with a native utility
          2. Perform a Bare-Metal Recovery
            1. Boot the system from alternate media
            2. Restore the boot block and prepare the new root drive
            3. Restore the operating system
        6. Live Method
          1. Create the Bare-Metal Backup
            1. Back up the important metadata
            2. Back up the operating system with a native utility
          2. Perform a Bare-Metal Recovery
            1. Boot the system from alternate media
            2. Restore the boot block information and prepare the new root drive
            3. Restore the operating system
        7. Alt-Boot Filesystem Method
          1. Create the Bare-Metal Backup
            1. Back up the important metadata
            2. Boot the system from alternate media
            3. Back up the operating system with a native utility
          2. Perform a Bare-Metal Recovery
            1. Boot the system from alternate media
            2. Restore the boot block and prepare the new root drive
            3. Restore the operating system
        8. Automate Bare-Metal Recovery with G4L
          1. Advantages of G4L
          2. Drawbacks of G4L
          3. Setting Up G4L
          4. Using G4L
          5. Customizing G4L
        9. Commercial Solutions
      3. 12. HP-UX Bare-Metal Recovery
        1. System Recovery with Ignite-UX
          1. Ignite-UX Overview
          2. Network Services and Remote Boot Protocols
          3. Differences Between HP Integrity and HP9000 Clients
        2. Planning for Ignite-UX Archive Storage and Recovery
          1. Considerations for the Remote Booting of Clients
          2. Sizing the Recovery Archive
          3. Configuring an Ignite-UX Network Server
          4. Recovery Archive Management
        3. Implementation Example
          1. Command-Line Examples
          2. Verifying Archive Contents
          3. Troubleshooting Recovery Operations
        4. System Cloning
        5. Security
        6. System Recovery and Disk Mirroring
      4. 13. AIX Bare-Metal Recovery
        1. IBM’s mksysb and savevg Utilities
          1. mksysb and savevg Format
          2. Preparing to Use mksysb and savevg
            1. Preparing for the restore
        2. Backing Up with mksysb
          1. mksysb Summary
          2. Backing Up rootvg to Locally Attached Tape
          3. Backing Up rootvg to a Remote Tape Drive
          4. Backing Up to Disk
          5. Making a Bootable DVD/CD from an Existing mksysb
          6. Creating a CD/DVD Backup in One Step
        3. Setting Up NIM
          1. Setting Up a NIM Server
          2. Adding a Client Definition to NIM
          3. Setting a mksysb Definition for a Client
        4. savevg Operations
          1. Using savevg to Back Up a Volume Group
        5. Verifying a mksysb or savevg Backup
        6. Restoring an AIX System with mksysb
        7. System Cloning
          1. AIX 4.x Operating System
          2. AIX 5.x Operating System
      5. 14. Mac OS X Bare-Metal Recovery
        1. How It Works
          1. Preparing for a Bare-Metal Recovery
          2. Performing a Bare-Metal Recovery
        2. A Sample Bare-Metal Recovery
          1. Perform the Backup
          2. Recover the System
    6. 5. Database Backup
      1. 15. Backing Up Databases
        1. Can It Be Done?
        2. Confusion: The Mysteries of Database Architecture
        3. The Muck Stops Here: Databases in Plain English
        4. What’s the Big Deal?
        5. Database Structure
          1. The Power User’s View: Logical Elements of a Database
            1. Instance
            2. Database
            3. Table
            4. Index
            5. LOBs
            6. Object
            7. Row
            8. Attribute
          2. The DBA’s View: Physical Elements of a Database Environment
            1. Page
            2. Datafile
            3. Extents
            4. Tablespace
            5. Partition
            6. Master database
            7. Transaction
            8. Rollback log
            9. Transaction log
            10. Checkpoint
        6. An Overview of a Page Change
        7. ACID Compliance
        8. What Can Happen to an RDBMS?
        9. Backing Up an RDBMS
          1. Physical and Logical Backups
          2. Get Every Instance
          3. Transaction Log Dumps Are Not Incremental Backups
          4. Do It Yourself: Creating Your Own Backup Utility
            1. Intermediary disk
            2. Dedicated tape drive
            3. Shell/batch scripts
          5. Calling a Professional
            1. DB2
            2. Exchange
            3. Informix
            4. MySQL
            5. Oracle
            6. PostgreSQL
            7. Sybase
            8. SQL Server
        10. Restoring an RDBMS
          1. Loss of Any Nondata Disk
          2. Loss of a Data Disk
          3. Online Partial Restores
        11. Documentation and Testing
        12. Unique Database Requirements
      2. 16. Oracle Backup and Recovery
        1. Two Backup Methods
          1. rman
          2. User-Managed Backups
        2. Oracle Architecture
          1. The Power User’s View
            1. Instance
            2. Database
            3. Table
            4. Index
            5. Large object datatypes
            6. Object
            7. Row
            8. Attribute
          2. The DBA’s View
            1. Blocks
            2. Extents
            3. Segment
            4. Datafile
            5. Tablespace
            6. Partition
            7. Control file
            8. Transaction
            9. Undo tablespace
            10. Checkpoint
            11. Flash recovery area
            12. Redo log
            13. Initialization parameters
            14. Restore versus recover
          3. Finding All Instances
        3. Physical Backups Without rman
          1. Cold Backup
          2. Hot Backup
          3. Debunking Hot-Backup Myths
        4. Physical Backups with rman
          1. Important New rman Features
          2. Automating rman
            1. Create a recovery catalog
            2. Create persistent parameters
            3. Create rman scripts
            4. The database.inc.rman command file (level 1 backups)
        5. Flashback
          1. Other Commercial Backup Methods
        6. Managing the Archived Redo Logs
        7. Recovering Oracle
          1. Using This Recovery Guide
          2. Seriously, Think About rman
          3. Step 1: Try Startup Mount
          4. Step 2: Are All Control Files Missing?
          5. Step 3: Replace Missing Control File
            1. “But I don’t have a good control file!”
          6. Step 4: Are All Datafiles and Redo Logs OK?
          7. Step 5: Restore Damaged Datafiles or Redo Logs
          8. Step 6: Is There a “Backup to Trace” of the Control File?
          9. Step 7: Run the create controlfile Script
          10. Step 8: Restore Control Files and Prepare the Database for Recovery
            1. 1) Restore control files from backup
            2. 2) Start up mount
          11. Step 9: Recover the Database
            1. Recover and open the database with rman
            2. Attempt to recover database manually
            3. Alter database open resetlogs
          12. Step 10: Does “alter database open” Work?
            1. Big shortcut for rman users
            2. User-managed backups: Read on
            3. Damaged datafile
            4. Damaged log group
            5. Damaged required tablespace
            6. Damaged rollback segment
            7. Before going any farther...
            8. How media recovery works
          13. Step 11: Are There Damaged Datafiles for Required Tablespaces?
          14. Step 12: Restore All Datafiles in Required Tablespaces
          15. Step 13: Damaged Nonrequired Datafile?
          16. Step 14: Take Damaged Datafile Offline
          17. Step 15: Were Any Datafiles Taken Offline?
          18. Step 16: Restore and Recover Offline Datafiles
            1. Restore the damaged datafiles
            2. Datafile recovery
            3. Tablespace recovery
            4. Database recovery
          19. Step 17: Is There a Damaged Online Log Group?
          20. Step 18: Are Any Rollback Segments Unavailable?
          21. Step 19: Recover Tablespace Containing Unavailable Rollback Segment
          22. Step 20: Is the Current Online Log Damaged?
          23. Step 21: Restore and Recover All Database Files from Backup
          24. Step 22: Run alter database open resetlogs
          25. Step 23: Is an Active Online Redo Log Damaged?
          26. Step 24: Perform a Checkpoint
          27. Step 25: Is an Inactive Online Redo Log Damaged?
          28. Step 26: Drop/Add a Damaged, Inactive Log Group
          29. You’re Done!
        8. Logical Backups
          1. Performing a Logical Backup
          2. Recovering with a Logical Backup
        9. A Broken Record
      3. 17. Sybase Backup and Recovery
        1. Sybase Architecture
          1. Overview of the Sybase Architecture
          2. Sybase Command-Line Utilities
            1. isql
            2. bcp
            3. dsedit
          3. Required Environment Variables
        2. The Power User’s View
          1. Server
          2. Engine
          3. Database
          4. Transaction
          5. Table
          6. System Table
          7. Index
          8. Stored Procedures
        3. The DBA’s View
          1. Page
          2. Extent
          3. Datafiles and Devices
          4. Segment
          5. Configuration File
          6. Transaction Log
          7. What Happens When Transaction Logs Fill Up?
            1. Transaction log sizing
          8. The interfaces File
          9. The SYBASE.sh and SYBASE.csh Files
          10. Backup Server
          11. Dump Device
          12. Hot and Cold Backups
        4. Protecting Your Database
          1. dbcc: The Database Consistency Checker
            1. Standard/nightly dbcc checks
          2. Reorgs
          3. Update Statistics
          4. Configuration Audits
          5. Implement Mirroring and Disk Striping
          6. How to Back Up Your Servers
            1. Syntax of the dump statement
            2. Backup striping and compression
          7. Have a Run Book
        5. Backup Automation Through Scripting
          1. Backup Automation Basics
            1. A simple update stats script
            2. A sample transaction logfiles backup script
            3. Schedule backups
            4. Mailing crontab results
          2. Logical Backups
            1. Performing a logical backup
            2. Performing a logical restore
            3. Auditing using bcp
        6. Physical Backups with a Storage Manager
        7. Recovering Your Database
          1. Recovering from a Disaster
          2. Restoring from Backups
            1. The online database command
            2. Restoring to a specific time
            3. Restoring from compressed backups
        8. Common Sybase Procedures
          1. Procedure 1: How to Start Sybase
          2. Procedure 2: How to See Whether Your Server Is Alive
          3. Procedure 3: How to Shut Down Your Server
            1. The first thing to try—normal shutdown
            2. The second thing to try—shutdown with nowait
            3. The third thing to try—kill -15 on the dataserver
            4. What you should NEVER do—kill -9 on the dataserver
            5. On Windows
          4. Procedure 4: How to Set Server Configuration Options
          5. Procedure 5: How to Set Database-Level Options
          6. Procedure 6: How to Run a Query
        9. Sybase Recovery Procedure
          1. Step 1: Can You Connect to Your Server Using isql?
          2. Step 2: Run the Stored Procedure sp_who
          3. Step 3: Blocked Processes
          4. Step 4: Log Suspend
          5. Step 5: You Can’t Connect Using isql
          6. Step 6: Check the Sybase Server Error Log
          7. Step 7: Check Whether Your Server Is Running
          8. Step 8: Running Server but Can’t Connect Remotely
          9. Step 9: Restart Your Server
          10. Step 10: Startup Failure
          11. Step 11: Contact Sybase Support Immediately
          12. Step 12: Able to Get Shared Memory?
          13. Step 13: Master Device Failure
          14. Step 14: Disk Device Failure
            1. Get a list of the databases that failed to load
            2. Check your available free space
            3. Get database recreation information
            4. Drop the broken database
            5. Recreate the database
            6. Reload your database
            7. Bring the database online
      4. 18. IBM DB2 Backup and Recovery
        1. DB2 Architecture
          1. The Power User’s View
            1. Instance
            2. Databases
            3. Schemas
            4. Tables
            5. Views
            6. Indexes
            7. DB2 engine dispatch units
          2. The DBA’s View
            1. Connecting to a DB2 database
            2. System catalog tables
            3. Database partition
            4. Containers
            5. Tablespaces
            6. Large objects (LOBs)
            7. Transaction logs
            8. Managing archive logs
        2. The backup, restore, rollforward, and recover Commands
          1. The backup Command
            1. Backup levels
            2. Backup path and filenaming convention
            3. Discovering the history of your backup operations
            4. Automatic maintenance
            5. Using db2look
          2. Recovery Types
            1. Crash recovery
            2. Version recovery
            3. Rollforward recovery
          3. The restore Command
          4. The rollforward Command
          5. The recover Command
        3. Recovering Your Database
          1. Performing an In-Place Version Recovery
            1. Step 1: Gather your database backups
            2. Step 2: Make sure the containers that existed during your backup are still around
            3. Step 3: Issue the restore or recover database command
            4. Step 4: Perform rollforward recovery
            5. Step 5: Reorganize the data and collect statistics
          2. Performing a Redirected Version Recovery
            1. Step 1: Restore the database backup and specify the redirect option
            2. Step 2: Define appropriate tablespace containers for the target database
            3. Step 3: Continue the redirected restore operation
            4. Step 4: Perform rollforward recovery
            5. Step 5: Reorganize the data and collect statistics
          3. Performing a Rollforward Recovery
            1. Step 1: Gather your logfiles
            2. Step 2: Determine the minimum PIT
            3. Step 3: Issue the rollforward command
            4. Step 4: Set constraints (if necessary)
            5. Step 5: Perform a database backup (if necessary)
            6. Step 6: Reorganize data and collect statistics
          4. Reorganizing Data and Collecting Statistics
      5. 19. SQL Server
        1. Overview of SQL Server
          1. Connecting to and Administering SQL Server
          2. SQL Server Authentication
            1. User authentication
            2. Service authentication
        2. The Power User’s View
          1. Instance
          2. Databases
            1. System databases
            2. User databases
            3. Viewing information about databases
          3. Tables
            1. System tables
            2. Temporary tables
            3. Index
            4. Partitioned tables
            5. Partitioned indexes
          4. Stored Procedures
          5. Memory Management
        3. The DBA’s View
          1. Database Files
          2. Filegroups
          3. Transaction Log
            1. Monitoring logfile size with dbcc
            2. Reducing the size of the physical log
          4. Pages
          5. Extents
          6. Partitions
          7. Table and Index Specifics
          8. Snapshot Backups (2005)
        4. Backups
          1. Backup Devices
            1. Logical and physical devices
          2. Recovery Models
            1. SQL Server 2005
            2. SQL Server 2000
          3. Backup Types
            1. Full
            2. Differential
            3. Transaction log
            4. Copy-only backup
            5. Partial backups
            6. File and filegroup
          4. Backup/Restore of System Databases
          5. Viewing Information About the Backup
          6. Verify Backups
          7. Backup Expiration Date
          8. How to Back Up
            1. Command-line backup with Transact-SQL
          9. Transaction Log Backups
            1. Log truncation
          10. Master Database Backups
          11. Scheduling a Backup
        5. Logical (Table-Level) Backups
        6. Restore and Recovery
          1. Components of a Restore
          2. Recovery Roadmap
            1. Step 1: Check for obvious hardware errors or server problems
            2. Step 2: Can you connect to the instance using a GUI or T-SQL?
            3. Step 3: Can you connect to the master database?
            4. Step 4: Can you connect to a specific, nonsystem database?
            5. Step 5: Initial checks
            6. Step 6: Are any datafiles missing?
            7. Step 7: Is the transaction log full?
            8. Step 8: Is it possible to repair the DB?
            9. Step 9: Before you begin the restore process
            10. Step 10: Restore under the simple recovery model
            11. Step 11: Restore under the full or bulk logged recovery model
          3. Database Restore
            1. Command-line restore with Transact-SQL
          4. Master Database Restore
      6. 20. Exchange
        1. Exchange Architecture
          1. Database Structure
          2. Extensible Storage Engine
          3. Stores
        2. Storage Groups
          1. Transaction Logfiles
          2. Checkpoint Files
          3. Reserve Logfiles
          4. General Logfile Info
          5. Circular Logging
          6. Other Files
          7. Single Instance Storage
          8. Automatic Database Maintenance
          9. Storage Limits
        3. Backup
          1. Backup Strategy
          2. Backup Types
            1. Normal
            2. Copy
            3. Incremental
            4. Differential
            5. Daily
          3. Determining What to Back Up
            1. Exchange-specific
            2. Windows-specific
            3. What not to back up when backing up Windows
          4. Backup Methods
            1. Online backups
            2. Offline backups
            3. Streaming backups
            4. Shadow copy backups
            5. Verifying backups
        4. Using ntbackup to Back Up
          1. Making a Basic Backup
          2. Verifying the Backup
        5. Restore
          1. Repair or Restore?
          2. Common Tasks for Repair or Restore
          3. Exchange Repair
            1. Repairing Exchange databases
            2. Repairing by reinstalling
        6. Exchange Restore
          1. Overview
          2. Restoring Exchange Mailbox or Public Folder Stores
            1. Online database restore
            2. Incremental and differential backups
            3. Hard recovery versus soft recovery
          3. Offline Database Restore
          4. Recovery Storage Group
            1. Example of RSG
            2. When to use RSG: Dial-tone restore
          5. Overlooked (and Often Easy) Restore Methods
            1. Restoring deleted mailboxes
            2. Restoring deleted items
          6. Using ntbackup to Restore
            1. Performing a basic restore
      7. 21. PostgreSQL
        1. PostgreSQL Architecture
          1. Clusters
          2. Tablespace
          3. Pagefile/Datafile
          4. Startup Scripts
          5. System Tables
          6. Large Objects
          7. Rollback Process
          8. Write Ahead Log
        2. Backup and Recovery
          1. Using pg_dump with pg_restore
            1. Backing up with pg_dump
            2. Restoring with pg_restore
          2. Using pg_dump with psql
          3. Using pg_dumpall with psql
        3. Point-in-Time Recovery
          1. Creating a Backup to Use with Point-in-Time Recovery
          2. Restoring from a Point-in-Time Backup
      8. 22. MySQL
        1. MySQL Architecture
          1. Shared Architectural Elements
            1. The power user’s view
            2. Instances
            3. Startup scripts
            4. Databases and tablespaces
            5. Large objects
            6. Binary log
          2. MyISAM Storage Engine
          3. InnoDB Storage Engine
            1. Concerns about InnoDB
            2. Transactions
            3. Tablespace
            4. Datafile
            5. Rollback segment or log group
            6. Transaction log
          4. Other Storage Engines
        2. MySQL Backup and Recovery Methodologies
          1. SQL-Level Backup and Recovery
            1. Backing up MyISAM tables
            2. Backing up InnoDB tables
            3. Repairing corrupted MyISAM tables
            4. SQL-level MySQL restores
          2. File-Level Backup and Recovery
            1. Build your own file-level backup
            2. File-level backup with mysqlhotcopy
            3. Restoring from file-level backups
          3. Using Point-in-Time Recovery
            1. Directly applying binary logs
            2. Applying binary logs via temporary SQL files
            3. Applying binary logs using date ranges
          4. MySQL Cluster Hot Backup and Recovery
            1. Initial configuration
            2. Performing a backup of MySQL cluster
            3. Restoring a MySQL cluster
    7. 6. Potpourri
      1. 23. VMware and Miscellanea
        1. Backing Up VMware Servers
          1. VMware Architecture
          2. VMware Backups
            1. Back up virtual machines as physical machines
            2. Back up suspended virtual machine files
            3. Copy/export a running virtual machine using VMware’s tools (ESX only)
          3. Using Bare-Metal Recovery to Migrate to VMware
        2. Volatile Filesystems
          1. Missing or Corrupted Files
          2. Referential Integrity Problems
          3. Corrupted or Unreadable Backup
          4. Torture-Testing Backup Programs
            1. Other warnings
            2. Conclusions
          5. Using Snapshots to Back Up a Volatile Filesystem
            1. How do snapshots work?
            2. Available snapshot software
        3. Demystifying dump
          1. Dumpster Diving
            1. Pass I
            2. Pass IIa
            3. Pass IIb
            4. Pass IIc
            5. Pre-Pass III
            6. Pass III
            7. Pass IV
            8. Post-Pass IV
            9. Summary of dump steps
          2. Answers to Our Questions
            1. Question 1
            2. Question 2
            3. Question 3
            4. Question 4
            5. Question 5
          3. A Final Analysis of dump
        4. How Do I Read This Volume?
          1. Prepare in Advance
          2. Wrong Media Type
          3. Bad or Dirty Drive or Tape
          4. Different Drive Types
          5. Wrong Compression Setting/Type
          6. The Little Endian That Couldn’t
          7. Block Size (Tape Volumes Only)
          8. Determine the Blocking Factor
          9. AIX and Its 512-Byte Block Size
          10. Unknown Backup Format
          11. Different Backup Format
          12. Damaged Volume
          13. Reading a “Flaky” Tape
          14. Multiple Partitions on a Tape
          15. If at First You Don’t Succeed...
        5. Gigabit Ethernet
        6. Disk Recovery Companies
        7. Yesterday
        8. Trust Me About the Backups
      2. 24. It’s All About Data Protection
        1. Business Reasons for Data Protection
          1. Mitigating Risk
            1. Data availability
            2. Internal/external security
            3. Regulatory compliance
          2. Reducing Costs
            1. Downtime costs
            2. Electronic discovery
            3. Security breaches
            4. Data classification
          3. Improving Service Levels
        2. Technical Reasons for Data Protection
          1. Device Issues
            1. Disk failures
            2. Tape media wear, stolen/misplaced tapes
            3. Networked storage risks
          2. External Threats
            1. Viruses
            2. Worms
            3. Trojan horses
            4. Accidental deletion
            5. Intentional deletion
        3. Backup and Archive
        4. What Needs to Be Backed Up?
        5. What Needs to Be Archived?
        6. Examples of Backup and Archive
        7. Can Open-Source Backup Do the Job?
          1. Very Active Filesystems
          2. Very Large Filesystems
          3. Filesystems with Too Many Files
          4. Information Stored in Databases
          5. Information Stored on Shared Storage
            1. SAN-based filesystems
            2. NAS-based filesystems
        8. Disaster Recovery
        9. Everything Starts with the Business
          1. Define the Core Competency of the Organization
          2. Prioritize the Business Functions Necessary to Continue the Core Competency
          3. Correlate Each System to a Business Function, and Prioritize
          4. Define RPO and RTO for Each Critical System
          5. Create Consistency Groups
          6. Determine for Each Critical System What to Protect from
          7. Determine the Costs of an Outage
          8. Plan for All Types of Disasters
          9. Prepare for Cost Justification
        10. Storage Security
          1. Plain-Text Communication
          2. Poor Authentication and Authorization Systems
          3. Backup Flaws
        11. Conclusion
    8. Index
    9. About the Author
    10. Colophon
    11. Copyright

    Product information

    • Title: Backup & Recovery
    • Author(s): W. Preston
    • Release date: January 2007
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9780596102463