Unix Backup and Recovery - Preston_ W. Curtis.pdf

(2764 KB) Pobierz
Unix Backup and Recovery
Page iii
Unix Backup and Recovery
W. Curtis Preston
Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo
Page iv
Disclaimer:
This netLibrary eBook does not include data from the CD-ROM that was part of the original hard copy book.
Unix Backup and Recovery
by W. Curtis Preston
Copyright (c) 1999 O'Reilly & Associates, Inc. All rights reserved.
Printed in the United States of America.
Published by O'Reilly & Associates, Inc., 101 Morris Street, Sebastopol, CA 95472.
Editor: Gigi Estabrook
Production Editor: Clairemarie Fisher O'Leary
Printing History:
November 1999: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by
manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was
aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of an Indian gavial and the topic of Unix
backup and recovery is a trademark of O'Reilly & Associates, Inc.
While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from
the use of the information contained herein.
This book is printed on acid-free paper with 85% recycled content, 15% post-consumer waste. O'Reilly & Associates is committed to using paper with the highest
recycled content available consistent with high quality.
ISBN: 1-56592-642-0
22783101.001.png 22783101.002.png 22783101.003.png
Page v
This book is dedicated to my lovely wife
Celynn, my beautiful daughters Nina and
Marissa, and to God, for continuing to bless
my life with gifts such as these.
-W. Curtis Preston
Page vii
TABLE OF CONTENTS
Preface
xiii
I. Introduction
1
1. Preparing for the Worst
3
My Dad Was Right
3
Developing a Disaster Recovery Plan
4
Step 1: Define (Un)acceptable Loss
5
Step 2: Back Up Everything
7
Step 3: Organize Everything
10
Step 4: Protect Against Disasters
13
Step 5: Document What You Have Done
15
Step 6: Test, Test, Test
16
Put It All Together
17
2. Backing It All Up
18
Don't Skip This Chapter!
18
Why Should You Read This Book?
19
How Serious Is Your Company About Backups?
22
You Can Find a Balance
25
Deciding What to Back Up
30
Deciding When to Back Up
38
Deciding How to Back Up
43
Storing Your Backups
52
Testing Your Backups
56
Monitoring Your Backups
58
Page viii
Following Proper Development Procedures
59
Unrelated Miscellanea
60
Good Luck
65
II. Freely Available Filesystem Backup & Recovery Utilities
67
3. Native Backup & Recovery Utilities
69
An Overview
69
Backing Up with the dump Utility
73
Restoring with the restore Utility
91
Limitations of dump and restore
101
Features to Check For
102
Backing Up and Restoring with the cpio Utility
103
Backing Up and Restoring with the tar Utility
114
Backing Up and Restoring with the dd Utility
122
Comparing tar, cpio, and dump
127
How Do I Read This Volume?
129
4. Free Backup Utilities
141
The hostdump.sh Utility
141
The infback.sh, oraback.sh, and syback.sh Utilities
142
A Really Fast tar Utility: star
142
Recording Configuration Data: The SysAudit Utility
143
Displaying Host Information: The SysInfo Utility
144
Performing Remote Detections: The queso Utility
144
Mapping Your Network: The nmap Utility
145
AMANDA
146
III. Commercial Filesystem Backup & Recovery Utilities
185
5. Commercial Backup Utilities
187
What to Look For
188
Full Support of Your Platforms
189
Backup of Raw Partitions
191
Backup of Very Large Filesystems and Files
192
Simultaneous Backup of Many Clients to One Drive
192
Simultaneous Backup of One Client to Many Drives
196
Page ix
Data Requiring Special Treatment
202
Storage Management Features
205
Reduction in Network Traffic
208
Support of a Standard or Custom Backup Format
216
Ease of Administration
219
Security
222
Ease of Recovery
223
Protection of the Backup Index
225
Robustness
227
Automation
227
Volume Verification
228
Cost
229
Vendor
230
Conclusions
231
6. High Availability
232
What Is High Availability?
232
HA Building Blocks
238
Commercial HA Solutions
243
The Impact of an HA Solution
245
IV. Bare-Metal Backup & Recovery Methods
247
7. SunOS/Solaris
249
What About Fire?
250
Homegrown Bare-Metal Recovery
251
Recovering a SunOS/Solaris System
256
8. Linux
270
How It Works
270
A Sample Bare-Metal Recovery
275
9. Compaq True-64 Unix
282
Compaq's btcreate Utility
283
Homegrown Bare-Metal Recovery
284
10. HP-UX
290
HP's make_recovery Utility
291
The copyutil Utility
295
Using dump and restore
299
Page x
11. IRIX
306
SGI's Backup and Restore Utilities
307
System Recovery with Backup Tape
310
Homegrown Bare-Metal Recovery
315
12. AIX
323
IBM's mksysb Utility
324
IBM's Sysback/6000 Utility
330
System Cloning
337
V. Database Backup & Recovery
339
13. Backing Up Databases
341
Can It Be Done?
342
Confusion: The Mysteries of Database Architecture
343
The Muck Stops Here: Databases in Plain English
344
What's the Big Deal?
345
Database Structure
346
An Overview of a Page Change
360
What Can Happen to an RDBMS?
361
Backing Up an RDBMS
363
Restoring an RDBMS
370
Documentation and Testing
374
Unique Database Requirements
375
14. Informix Backup & Recovery
376
Informix Architecture
377
Automating Informix Startup: The dbstart.informix.sh Script
387
Protect the Physical Log, Logical Log, and sysmaster
392
Which Backup Utility Should I Use?
400
Physical Backups Without a Storage Manager: ontape
403
Zgłoś jeśli naruszono regulamin