×
思维导图备注
Backup & Recovery - W. Curtis Preston
首页
收藏书籍
阅读记录
书签管理
我的书签
添加书签
移除书签
15. Backing Up Databases
浏览
3
扫码
小字体
中字体
大字体
2022-02-24 00:35:01
请
登录
再阅读
上一篇:
下一篇:
Preface
I Wish I’d Had This Book
Only the Recovery Matters
Products Change
Backing Up Databases Is Not That Hard
Bare-Metal Recovery Is Not That Hard
How This Book Is Organized
Part I
Part II
Part III
Part IV
Part V
Part VI
What’s New in This Book
What’s Missing?
Speaking of BackupCentral.com
Conventions Used in This Book
How to Contact Us
Safari® Enabled
This Book Was a Team Effort
Contributors
Technical Editors
Horror Stories
Special Mention
I Don’t Know It All
How Can I Say Thanks?
1. Introduction
1. The Philosophy of Backup
Champagne Backup on a Beer Budget
Why Should I Read This Book?
Schadenfreude
You Never Want to Say These Words
You’re Curious About Open-Source Backup Products
You Want to Learn About Disk-Based Backup
Why Back Up?
What Will Lost Data Cost You?
What Will Downtime Cost You?
Wax On, Wax Off: Finding a Balance
Don’t Go Overboard
Get the Coverage That You Need
Why the Word “Volume” Instead of “Tape”?
2. Backing It All Up
Don’t Skip This Chapter!
The Impossible Job That No One Wants
Deciding Why You Are Backing Up
Deciding What to Back Up
Plan for the Worst
Take an Inventory
Are You Backing Up What You Think You’re Backing Up?
Back Up All or Part of the System?
Deciding When to Back Up
Backup Levels
Which Levels Do You Run and When?
“In the Middle of the Night...”
Deciding How to Back Up
Be Ready for Anything: 10 Types of Disasters
Automate Your Backup
Plan for Expansion
Don’t Forget Unix mtime, atime, and ctime
Don’t Forget ACLs
Don’t Forget Mac OS Resource Forks
Keep It Simple, SA
Storing Your Backups
Storage in General
On-Site Storage
Off-Site Storage
Testing Your Backups
Test Everything!
Test Often
Monitoring Your Backups
You Can Always Make It Better
If It’s Not Baroque, Don’t Fix It
Following Proper Development Procedures
Unrelated Miscellanea
Protect Your Career
Get the Money Your Backups Need
Good Luck
2. Open-Source Backup Utilities
3. Basic Backup and Recovery Utilities
An Overview
How Mac OS Filesystems Are Different
cpio
ditto
dd
dump and restore
ntbackup
rsync
System Restore
tar
Other Utilities
Backing Up and Restoring with ntbackup
Creating a Simple Backup Configuration
Executing Your Simple Backup
Restoring with ntbackup
Using System Restore in Windows
Creating Restore Points
Recovering Windows Using a Restore Point
Backing Up with the dump Utility
Syntax of the dump Command
The Options to the dump Command
What a dump Backup Looks Like
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
Limitations of dump and restore
Features to Check For
Backing Up and Restoring with the cpio Utility
The Syntax of cpio When Backing Up
The Options to the cpio 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
The 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 to Determine the Block Size of a Tape
Using dd to Figure out the Backup Format
Using rsync
Basic rsync Syntax
Restoring with rsync
Backing Up and Restoring with the ditto Utility
Syntax of ditto When Backing Up
The Options to the ditto Command
Syntax of ditto when Restoring
Comparing tar, cpio, and dump
Using ssh or rsh as a Conduit Between Systems
4. Amanda
Summary of Important Features
Client/Server Architecture Using Nonproprietary Tools
Amanda Security
Holding Disk
Backup Scheduling
Tape Management
Device Management
Configuring Amanda
Backing Up Clients via NFS or Samba
Backing Up Using NFS
Backing Up via Samba
Amanda Recovery
Community and Support Options
Future Plans
5. BackupPC
BackupPC Features
How BackupPC Works
Installation How-To
Security Versus Ease of Use
Basic Sizing
Installing BackupPC
Starting BackupPC
Using the CGI Interface
Configuration Files
Per-Client Configuration
The BackupPC Community
The Future of BackupPC
6. Bacula
Bacula Architecture
Bacula Components
Interaction Between Components
Bacula Features
An Example Configuration
Setting Up the Server
Initial Backup (Linux Client)
Initial Restore (Linux Client)
Windows Backup
Mac OS X Backup
Advanced Features
Bare-Metal Recovery
Backup Traffic and Storage Encryption
Python Script Support
Client Script Support
Autochanger Support
ANSI and IBM Tape Labels
File-Based Intrusion Detection
Future Directions
Pool Migration
Tracking Deleted/Renamed Files
Python-Based GUI Tool
Base Job Support
Client-Initiated Backups
Plug-in Support for File Daemons
7. Open-Source Near-CDP
rsync with Snapshots
An Example
Beyond the Example
Understanding Hard Links
Hard-Link Copies
Restoring from the Backup
Things to Consider
rsnapshot
Platform Support
When Not to Use rsnapshot
Setting Up rsnapshot
The rsnapshot Community
rdiff-backup
Advantages
Disadvantages
Quick Start
Windows, Mac OS X, and the Future
3. Commercial Backup
8. Commercial Backup Utilities
What to Look For
Full Support of Your Platforms
Should You Back Up Special Files?
Backup of Raw Partitions
Backup of Very Large Filesystems and Files
Aggressive Requirements
LAN-Free Backup
Server-Free (or Serverless) Backup
De-Duplication Backup Systems
Snapshots
Replication
Near-Continuous Data Protection Systems
Continuous Data Protection Systems
Remote Office Backup
Simultaneous Backup of Many Clients to One Drive
Disk-to-Disk-to-Tape Backup
Simultaneous Backup of One Client to Many Drives
Data Requiring Special Treatment
Network-Mounted Filesystems
Custom User Scripts
Databases
Storage Management Features
Archives
Hierarchical Storage Management
Information Lifecycle Management
Reduction in Network Traffic
Keep Backup Traffic at the Subnet Level
Use Client-Side Compression
Incorporate Throttling
Storage Area Networks
Support of a Standard or Custom Backup Format
Standard Backup Formats
Custom Backup Formats
A Reality Check
Ease of Administration
Security
Ease of Recovery
Protection of the Backup Index
Robustness
Automation
Volume Verification
Cost
Vendor
Final Thoughts
9. Backup Hardware
Decision Factors
Reliability
Duty Cycle
Transfer Speed
Flexibility
Time-to-Data
Capacity
Removability
Cost
Summary
Using Backup Hardware
Compression
Density Versus Compression
How Often Should I Change My Media?
Cartridge Care
Drive Care
Nearline and Offline Storage
Tape Drives
Tape Drives Must Be Streamed
Compression Makes It Harder to Stream Drives
Variable Speed Tape Drives
Helical and Linear Tape Drives Are Different
Cartridges Versus Cassettes
Midrange Tape Drive Types
Optical Drives
Optical Recording Methods
Optical Recording Formats
Automated Backup Hardware
Disk Targets
Disk-As-Disk Targets
Disk-As-Tape: Virtual Tape Libraries
Disk Features to Consider
Disk-As-Tape: Virtual Tape Cartridges
4. Bare-Metal Recovery
10. Solaris Bare-Metal Recovery
Using Flash Archive
Backup and Recovery Overview
Initial Considerations
Preparing for an Interactive Restore
Creating Flash Archive Images
Bare-Metal Recovery with Flash Archive
Setup of a Noninteractive Restore
Noninteractive Setup Files
Creating a Noninteractive Tape Image
Creating a Noninteractive Disk Image
Post-Recovery Procedures
Final Thoughts
11. Linux and Windows
How It Works
If Then GOTO
Choosing Backup Methods
The Steps in Theory
Step 1: Back Up Important Metadata
Step 2: Back Up the OS with a Native Utility
Step 3: Boot the System from Alternate Media
Step 4: Restore the Boot Block Information
Step 5: Partition and Format the New Root Drive
Step 6: Restore the OS to the New Root Drive
Assumptions
Alt-Boot Full Image Method
Create the Bare-Metal Backup
Perform a Bare-Metal Recovery
Alt-Boot Partition Image Method
Create the Bare-Metal Backup
Perform a Bare-Metal Recovery
Live Method
Create the Bare-Metal Backup
Perform a Bare-Metal Recovery
Alt-Boot Filesystem Method
Create the Bare-Metal Backup
Perform a Bare-Metal Recovery
Automate Bare-Metal Recovery with G4L
Advantages of G4L
Drawbacks of G4L
Setting Up G4L
Using G4L
Customizing G4L
Commercial Solutions
12. HP-UX Bare-Metal Recovery
System Recovery with Ignite-UX
Ignite-UX Overview
Network Services and Remote Boot Protocols
Differences Between HP Integrity and HP9000 Clients
Planning for Ignite-UX Archive Storage and Recovery
Considerations for the Remote Booting of Clients
Sizing the Recovery Archive
Configuring an Ignite-UX Network Server
Recovery Archive Management
Implementation Example
Command-Line Examples
Verifying Archive Contents
Troubleshooting Recovery Operations
System Cloning
Security
System Recovery and Disk Mirroring
13. AIX Bare-Metal Recovery
IBM’s mksysb and savevg Utilities
mksysb and savevg Format
Preparing to Use mksysb and savevg
Backing Up with mksysb
mksysb Summary
Backing Up rootvg to Locally Attached Tape
Backing Up rootvg to a Remote Tape Drive
Backing Up to Disk
Making a Bootable DVD/CD from an Existing mksysb
Creating a CD/DVD Backup in One Step
Setting Up NIM
Setting Up a NIM Server
Adding a Client Definition to NIM
Setting a mksysb Definition for a Client
savevg Operations
Using savevg to Back Up a Volume Group
Verifying a mksysb or savevg Backup
Restoring an AIX System with mksysb
System Cloning
AIX 4.x Operating System
AIX 5.x Operating System
14. Mac OS X Bare-Metal Recovery
How It Works
Preparing for a Bare-Metal Recovery
Performing a Bare-Metal Recovery
A Sample Bare-Metal Recovery
Perform the Backup
Recover the System
5. Database Backup
15. 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?
Database Structure
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
ACID Compliance
What Can Happen to an RDBMS?
Backing Up an RDBMS
Physical and Logical Backups
Get Every Instance
Transaction Log Dumps Are Not Incremental Backups
Do It Yourself: Creating Your Own Backup Utility
Calling a Professional
Restoring an RDBMS
Loss of Any Nondata Disk
Loss of a Data Disk
Online Partial Restores
Documentation and Testing
Unique Database Requirements
16. Oracle Backup and Recovery
Two Backup Methods
rman
User-Managed Backups
Oracle Architecture
The Power User’s View
The DBA’s View
Finding All Instances
Physical Backups Without rman
Cold Backup
Hot Backup
Debunking Hot-Backup Myths
Physical Backups with rman
Important New rman Features
Automating rman
Flashback
Other Commercial Backup Methods
Managing the Archived Redo Logs
Recovering Oracle
Using This Recovery Guide
Seriously, Think About rman
Step 1: Try Startup Mount
Step 2: Are All Control Files Missing?
Step 3: Replace Missing Control File
Step 4: Are All Datafiles and Redo Logs OK?
Step 5: Restore Damaged Datafiles or Redo Logs
Step 6: Is There a “Backup to Trace” of the Control File?
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: Are There Damaged Datafiles for Required Tablespaces?
Step 12: Restore All Datafiles in Required Tablespaces
Step 13: Damaged Nonrequired Datafile?
Step 14: Take Damaged Datafile Offline
Step 15: Were Any Datafiles Taken Offline?
Step 16: Restore and Recover Offline Datafiles
Step 17: Is There a Damaged Online Log Group?
Step 18: Are Any Rollback Segments Unavailable?
Step 19: Recover Tablespace Containing Unavailable Rollback Segment
Step 20: Is the Current Online Log Damaged?
Step 21: Restore and Recover All Database Files from Backup
Step 22: Run alter database open resetlogs
Step 23: Is an Active Online Redo Log Damaged?
Step 24: Perform a Checkpoint
Step 25: Is an Inactive Online Redo Log Damaged?
Step 26: Drop/Add a Damaged, Inactive Log Group
You’re Done!
Logical Backups
Performing a Logical Backup
Recovering with a Logical Backup
A Broken Record
17. Sybase Backup and Recovery
Sybase Architecture
Overview of the Sybase Architecture
Sybase Command-Line Utilities
Required Environment Variables
The Power User’s View
Server
Engine
Database
Transaction
Table
System Table
Index
Stored Procedures
The DBA’s View
Page
Extent
Datafiles and Devices
Segment
Configuration File
Transaction Log
What Happens When Transaction Logs Fill Up?
The interfaces File
The SYBASE.sh and SYBASE.csh Files
Backup Server
Dump Device
Hot and Cold Backups
Protecting Your Database
dbcc: The Database Consistency Checker
Reorgs
Update Statistics
Configuration Audits
Implement Mirroring and Disk Striping
How to Back Up Your Servers
Have a Run Book
Backup Automation Through Scripting
Backup Automation Basics
Logical Backups
Physical Backups with a Storage Manager
Recovering Your Database
Recovering from a Disaster
Restoring from Backups
Common Sybase Procedures
Procedure 1: How to Start Sybase
Procedure 2: How to See Whether Your Server Is Alive
Procedure 3: How to Shut Down Your Server
Procedure 4: How to Set Server Configuration Options
Procedure 5: How to Set Database-Level Options
Procedure 6: How to Run a Query
Sybase Recovery Procedure
Step 1: Can You Connect to Your Server Using isql?
Step 2: Run the Stored Procedure sp_who
Step 3: Blocked Processes
Step 4: Log Suspend
Step 5: You Can’t Connect Using isql
Step 6: Check the Sybase Server Error Log
Step 7: Check Whether Your Server Is Running
Step 8: Running Server but Can’t Connect Remotely
Step 9: Restart Your Server
Step 10: Startup Failure
Step 11: Contact Sybase Support Immediately
Step 12: Able to Get Shared Memory?
Step 13: Master Device Failure
Step 14: Disk Device Failure
18. IBM DB2 Backup and Recovery
DB2 Architecture
The Power User’s View
The DBA’s View
The backup, restore, rollforward, and recover Commands
The backup Command
Recovery Types
The restore Command
The rollforward Command
The recover Command
Recovering Your Database
Performing an In-Place Version Recovery
Performing a Redirected Version Recovery
Performing a Rollforward Recovery
Reorganizing Data and Collecting Statistics
19. SQL Server
Overview of SQL Server
Connecting to and Administering SQL Server
SQL Server Authentication
The Power User’s View
Instance
Databases
Tables
Stored Procedures
Memory Management
The DBA’s View
Database Files
Filegroups
Transaction Log
Pages
Extents
Partitions
Table and Index Specifics
Snapshot Backups (2005)
Backups
Backup Devices
Recovery Models
Backup Types
Backup/Restore of System Databases
Viewing Information About the Backup
Verify Backups
Backup Expiration Date
How to Back Up
Transaction Log Backups
Master Database Backups
Scheduling a Backup
Logical (Table-Level) Backups
Restore and Recovery
Components of a Restore
Recovery Roadmap
Database Restore
Master Database Restore
20. Exchange
Exchange Architecture
Database Structure
Extensible Storage Engine
Stores
Storage Groups
Transaction Logfiles
Checkpoint Files
Reserve Logfiles
General Logfile Info
Circular Logging
Other Files
Single Instance Storage
Automatic Database Maintenance
Storage Limits
Backup
Backup Strategy
Backup Types
Determining What to Back Up
Backup Methods
Using ntbackup to Back Up
Making a Basic Backup
Verifying the Backup
Restore
Repair or Restore?
Common Tasks for Repair or Restore
Exchange Repair
Exchange Restore
Overview
Restoring Exchange Mailbox or Public Folder Stores
Offline Database Restore
Recovery Storage Group
Overlooked (and Often Easy) Restore Methods
Using ntbackup to Restore
21. PostgreSQL
PostgreSQL Architecture
Clusters
Tablespace
Pagefile/Datafile
Startup Scripts
System Tables
Large Objects
Rollback Process
Write Ahead Log
Backup and Recovery
Using pg_dump with pg_restore
Using pg_dump with psql
Using pg_dumpall with psql
Point-in-Time Recovery
Creating a Backup to Use with Point-in-Time Recovery
Restoring from a Point-in-Time Backup
22. MySQL
MySQL Architecture
Shared Architectural Elements
MyISAM Storage Engine
InnoDB Storage Engine
Other Storage Engines
MySQL Backup and Recovery Methodologies
SQL-Level Backup and Recovery
File-Level Backup and Recovery
Using Point-in-Time Recovery
MySQL Cluster Hot Backup and Recovery
6. Potpourri
23. VMware and Miscellanea
Backing Up VMware Servers
VMware Architecture
VMware Backups
Using Bare-Metal Recovery to Migrate to VMware
Volatile Filesystems
Missing or Corrupted Files
Referential Integrity Problems
Corrupted or Unreadable Backup
Torture-Testing Backup Programs
Using Snapshots to Back Up a Volatile Filesystem
Demystifying dump
Dumpster Diving
Answers to Our Questions
A Final Analysis of dump
How Do I Read This Volume?
Prepare in Advance
Wrong Media Type
Bad or Dirty Drive or Tape
Different Drive Types
Wrong Compression Setting/Type
The Little Endian That Couldn’t
Block Size (Tape Volumes Only)
Determine the Blocking Factor
AIX and Its 512-Byte Block Size
Unknown Backup Format
Different Backup Format
Damaged Volume
Reading a “Flaky” Tape
Multiple Partitions on a Tape
If at First You Don’t Succeed...
Gigabit Ethernet
Disk Recovery Companies
Yesterday
Trust Me About the Backups
24. It’s All About Data Protection
Business Reasons for Data Protection
Mitigating Risk
Reducing Costs
Improving Service Levels
Technical Reasons for Data Protection
Device Issues
External Threats
Backup and Archive
What Needs to Be Backed Up?
What Needs to Be Archived?
Examples of Backup and Archive
Can Open-Source Backup Do the Job?
Very Active Filesystems
Very Large Filesystems
Filesystems with Too Many Files
Information Stored in Databases
Information Stored on Shared Storage
Disaster Recovery
Everything Starts with the Business
Define the Core Competency of the Organization
Prioritize the Business Functions Necessary to Continue the Core Competency
Correlate Each System to a Business Function, and Prioritize
Define RPO and RTO for Each Critical System
Create Consistency Groups
Determine for Each Critical System What to Protect from
Determine the Costs of an Outage
Plan for All Types of Disasters
Prepare for Cost Justification
Storage Security
Plain-Text Communication
Poor Authentication and Authorization Systems
Backup Flaws
Conclusion
Index
暂无相关搜索结果!
×
二维码
手机扫一扫,轻松掌上学
×
《Backup & Recovery - W. Curtis Preston》电子书下载
请下载您需要的格式的电子书,随时随地,享受学习的乐趣!
EPUB 电子书
×
书签列表
×
阅读记录
阅读进度:
0.00%
(
0/0
)
重置阅读进度