logo资料库

mysql-enterprise-backup.pdf

第1页 / 共192页
第2页 / 共192页
第3页 / 共192页
第4页 / 共192页
第5页 / 共192页
第6页 / 共192页
第7页 / 共192页
第8页 / 共192页
资料共192页,剩余部分请下载后查看
MySQL Enterprise Backup User's Guide (Version 4.1.0)
Table of Contents
Preface and Legal Notices
Part I Getting Started with MySQL Enterprise Backup
Chapter 1 Introduction to MySQL Enterprise Backup
1.1 The mysqlbackup Client
1.2 Overview of Backup Types
1.3 Files that Are Backed Up
1.3.1 Types of Files Contained in a Backup
1.3.2 Files Backed up for InnoDB Data
1.3.3 Files Backed up for Data Stored with MyISAM and Other Storage Engines
1.3.4 Files Generated by mysqlbackup
Chapter 2 Installing MySQL Enterprise Backup
Chapter 3 What's New in MySQL Enterprise Backup 4.1?
Part II Using MySQL Enterprise Backup
Chapter 4 Backing Up a Database Server
4.1 Before the First Backup
4.1.1 Collect Database Information
4.1.2 Grant MySQL Privileges to Backup Administrator
4.1.3 Designate a Location for the Backup Directory
4.2 The Typical Backup / Verify / Restore Cycle
4.2.1 Backing Up an Entire MySQL Instance
4.2.2 Verifying a Backup
4.2.3 Restoring a Database
4.3 Backup Scenarios and Examples
4.3.1 Making a Single-File Backup
4.3.1.1 Streaming the Backup Data to Another Device or Server
4.3.1.2 Backing Up to Tape
4.3.1.3 Backing Up to Cloud Storage
4.3.2 Making a Full Backup
4.3.3 Making a Differential or Incremental Backup
4.3.4 Making a Compressed Backup
4.3.5 Making a Partial Backup
4.3.6 Making an Optimistic Backup
4.3.7 Making a Back Up of In-Memory Database Data
4.3.8 Making Scheduled Backups
4.4 Making Backups with a Distributed File System (DFS) or Storage Access Network (SAN)
Chapter 5 Recovering or Restoring a Database
5.1 Performing a Restore Operation
5.1.1 Restoring a Compressed Backup
5.1.2 Restoring an Encrypted Backup Image
5.1.3 Restoring an Incremental Backup
5.1.4 Restoring Backups Created with the --use-tts Option
5.1.5 Restoring a Backup from Cloud Storage to a MySQL Server
5.1.6 Advanced: Preparing and Restoring a Directory Backup
5.2 Point-in-Time Recovery from a Hot Backup
5.3 Restoring a Backup with a Database Upgrade or Downgrade
Chapter 6 Working with Encrypted InnoDB Tables
Chapter 7 Using MySQL Enterprise Backup with Replication
7.1 Setting Up a New Replication Slave
7.2 Backing up and Restoring a Slave Database
7.3 Restoring a Master Database
Chapter 8 Encryption for Backups
Chapter 9 Using MySQL Enterprise Backup with Media Management Software (MMS) Products
9.1 Backing Up to Tape with Oracle Secure Backup
Chapter 10 Performance Considerations for MySQL Enterprise Backup
10.1 Optimizing Backup Performance
10.2 Optimizing Restore Performance
Chapter 11 Monitoring Backups with MySQL Enterprise Monitor
Chapter 12 Troubleshooting for MySQL Enterprise Backup
12.1 Exit codes of MySQL Enterprise Backup
12.2 Working Around Corruption Problems
12.3 Using the MySQL Enterprise Backup Logs
12.4 Using the MySQL Enterprise Backup Manifest
Part III mysqlbackup Command Reference
Chapter 13 mysqlbackup
Chapter 14 mysqlbackup commands
14.1 Backup Operations
14.2 Update Operations
14.3 Restore Operations
14.4 Validation Operations
14.5 Other Single-File Backup Operations
14.6 Other Operations
Chapter 15 mysqlbackup Command-Line Options
15.1 Standard Options
15.2 Connection Options
15.3 Server Repository Options
15.4 Backup Repository Options
15.5 Metadata Options
15.6 Compression Options
15.7 Incremental Backup Options
15.8 Partial Backup and Restore Options
15.9 Single-File Backup Options
15.10 Performance / Scalability / Capacity Options
15.11 Message Logging Options
15.12 Progress Report Options
15.13 Encryption Options
15.14 Options for Working with Encrypted InnoDB Tablespaces
15.15 Cloud Storage Options
15.16 Options for Special Backup Types
15.17 Other Options
Chapter 16 Configuration Files and Parameters
Part IV Appendixes
Appendix A Frequently Asked Questions for MySQL Enterprise Backup
Appendix B Limitations of MySQL Enterprise Backup
Appendix C Compatibility Information for MySQL Enterprise Backup
C.1 Cross-Platform Compatibility
C.2 Compatibility with MySQL Versions
C.3 Compatibility with Older MySQL Enterprise Backup
MySQL Enterprise Backup Glossary
Index
MySQL Enterprise Backup User's Guide (Version 4.1.0)
Abstract This is the user manual for MySQL Enterprise Backup, a commercially licensed backup utility for MySQL databases. It explains the different kinds of backup and restore that can be performed with MySQL Enterprise Backup, and describes the commands for performing them. Strategies for optimizing backup and restore operations are also discussed. For notes detailing the changes in each release, see the MySQL Enterprise Backup 4.1 Release Notes. For legal information, see the Legal Notices. Licensing information. This product may include third-party software, used under license. See this document for licensing information, including licensing information relating to third-party software that may be included in this MySQL Enterprise Backup release. For help with using MySQL, please visit either the MySQL Forums or MySQL Mailing Lists, where you can discuss your issues with other MySQL users. For additional documentation on MySQL products, including translations of the documentation into other languages, and downloadable versions in variety of formats, including HTML and PDF formats, see the MySQL Documentation Library. Document generated on: 2017-04-05 (revision: 6821)
Table of Contents Preface and Legal Notices ........................................................................................................... ix I Getting Started with MySQL Enterprise Backup ........................................................................... 1 1 Introduction to MySQL Enterprise Backup ........................................................................... 5 1.1 The mysqlbackup Client .......................................................................................... 5 1.2 Overview of Backup Types ...................................................................................... 5 1.3 Files that Are Backed Up ........................................................................................ 7 1.3.1 Types of Files Contained in a Backup ........................................................... 7 1.3.2 Files Backed up for InnoDB Data ................................................................ 18 1.3.3 Files Backed up for Data Stored with MyISAM and Other Storage Engines ..... 18 1.3.4 Files Generated by mysqlbackup ................................................................ 19 2 Installing MySQL Enterprise Backup ................................................................................. 21 3 What's New in MySQL Enterprise Backup 4.1? ................................................................. 23 II Using MySQL Enterprise Backup .............................................................................................. 25 4 Backing Up a Database Server ........................................................................................ 29 4.1 Before the First Backup ......................................................................................... 29 4.1.1 Collect Database Information ...................................................................... 29 4.1.2 Grant MySQL Privileges to Backup Administrator ......................................... 31 4.1.3 Designate a Location for the Backup Directory ............................................. 32 4.2 The Typical Backup / Verify / Restore Cycle ........................................................... 32 4.2.1 Backing Up an Entire MySQL Instance ........................................................ 32 4.2.2 Verifying a Backup ..................................................................................... 34 4.2.3 Restoring a Database ................................................................................. 36 4.3 Backup Scenarios and Examples ........................................................................... 39 4.3.1 Making a Single-File Backup ....................................................................... 39 4.3.2 Making a Full Backup ................................................................................. 43 4.3.3 Making a Differential or Incremental Backup ................................................ 44 4.3.4 Making a Compressed Backup ................................................................... 49 4.3.5 Making a Partial Backup ............................................................................. 50 4.3.6 Making an Optimistic Backup ...................................................................... 54 4.3.7 Making a Back Up of In-Memory Database Data .......................................... 57 4.3.8 Making Scheduled Backups ........................................................................ 57 4.4 Making Backups with a Distributed File System (DFS) or Storage Access Network (SAN) ......................................................................................................................... 57 5 Recovering or Restoring a Database ................................................................................ 59 5.1 Performing a Restore Operation ............................................................................ 59 5.1.1 Restoring a Compressed Backup ................................................................ 60 5.1.2 Restoring an Encrypted Backup Image ........................................................ 61 5.1.3 Restoring an Incremental Backup ................................................................ 61 5.1.4 Restoring Backups Created with the --use-tts Option .............................. 62 5.1.5 Restoring a Backup from Cloud Storage to a MySQL Server ......................... 63 5.1.6 Advanced: Preparing and Restoring a Directory Backup ............................... 64 5.2 Point-in-Time Recovery from a Hot Backup ............................................................ 64 5.3 Restoring a Backup with a Database Upgrade or Downgrade .................................. 65 6 Working with Encrypted InnoDB Tables ............................................................................ 67 7 Using MySQL Enterprise Backup with Replication ............................................................. 71 7.1 Setting Up a New Replication Slave ....................................................................... 71 7.2 Backing up and Restoring a Slave Database .......................................................... 73 7.3 Restoring a Master Database ................................................................................ 74 8 Encryption for Backups .................................................................................................... 75 9 Using MySQL Enterprise Backup with Media Management Software (MMS) Products .......... 77 9.1 Backing Up to Tape with Oracle Secure Backup ..................................................... 77 10 Performance Considerations for MySQL Enterprise Backup ............................................. 81 10.1 Optimizing Backup Performance .......................................................................... 81 10.2 Optimizing Restore Performance .......................................................................... 84 11 Monitoring Backups with MySQL Enterprise Monitor ........................................................ 87 iii
MySQL Enterprise Backup User's Guide (Version 4.1.0) 12 Troubleshooting for MySQL Enterprise Backup ................................................................ 89 12.1 Exit codes of MySQL Enterprise Backup .............................................................. 89 12.2 Working Around Corruption Problems .................................................................. 90 12.3 Using the MySQL Enterprise Backup Logs ........................................................... 91 12.4 Using the MySQL Enterprise Backup Manifest ...................................................... 92 III mysqlbackup Command Reference ....................................................................................... 95 13 mysqlbackup ............................................................................................................... 99 14 mysqlbackup commands ............................................................................................ 101 14.1 Backup Operations ............................................................................................ 101 14.2 Update Operations ............................................................................................ 102 14.3 Restore Operations ........................................................................................... 103 14.4 Validation Operations ........................................................................................ 106 14.5 Other Single-File Backup Operations .................................................................. 106 14.6 Other Operations ............................................................................................... 108 15 mysqlbackup Command-Line Options ......................................................................... 109 15.1 Standard Options .............................................................................................. 115 15.2 Connection Options ........................................................................................... 116 15.3 Server Repository Options ................................................................................. 118 15.4 Backup Repository Options ................................................................................ 120 15.5 Metadata Options .............................................................................................. 124 15.6 Compression Options ........................................................................................ 124 15.7 Incremental Backup Options .............................................................................. 126 15.8 Partial Backup and Restore Options ................................................................... 128 15.9 Single-File Backup Options ................................................................................ 134 15.10 Performance / Scalability / Capacity Options ..................................................... 136 15.11 Message Logging Options ................................................................................ 143 15.12 Progress Report Options .................................................................................. 144 15.13 Encryption Options .......................................................................................... 147 15.14 Options for Working with Encrypted InnoDB Tablespaces .................................. 148 15.15 Cloud Storage Options .................................................................................... 149 15.16 Options for Special Backup Types .................................................................... 151 15.17 Other Options .................................................................................................. 153 16 Configuration Files and Parameters .............................................................................. 155 IV Appendixes .......................................................................................................................... 157 A Frequently Asked Questions for MySQL Enterprise Backup ............................................. 161 B Limitations of MySQL Enterprise Backup ........................................................................ 163 C Compatibility Information for MySQL Enterprise Backup .................................................. 165 C.1 Cross-Platform Compatibility ............................................................................... 165 C.2 Compatibility with MySQL Versions ..................................................................... 165 C.3 Compatibility with Older MySQL Enterprise Backup .............................................. 165 MySQL Enterprise Backup Glossary .................................................................................. 167 Index ........................................................................................................................................ 179 iv
List of Tables 1.1 Types of Files in a Backup ..................................................................................................... 7 4.1 Information Needed to Back Up a Database .......................................................................... 29 12.1 MySQL Enterprise Backup Exit Codes and Messages ........................................................... 89 15.1 List of All Options .............................................................................................................. 109 v
vi
List of Examples 4.1 Single-File Backup to Absolute Path ...................................................................................... 39 4.2 Single-File Backup to Relative Path ....................................................................................... 39 4.3 Single-File Backup to Standard Output .................................................................................. 39 4.4 Convert Existing Backup Directory to Single Image ................................................................. 40 4.5 Extract Existing Image to Backup Directory ............................................................................ 40 4.6 List Single-File Backup Contents ........................................................................................... 40 4.7 Validate a Single-File Backup ................................................................................................ 40 4.8 Extract Single-File Backup into Current Directory .................................................................... 40 4.9 Extract Single-File Backup into a Backup Directory ................................................................. 40 4.10 Selective Extract of Single File ............................................................................................ 40 4.11 Selective Extract of Single Directory .................................................................................... 41 4.12 Dealing with Absolute Path Names ...................................................................................... 41 4.13 Single-File Backup to a Remote Host ................................................................................... 41 4.14 Single-file Backup to a Remote MySQL Server ..................................................................... 41 4.15 Stream a Backup Directory to a Remote MySQL Server ........................................................ 42 4.16 Creating a Cloud Backup in an Oracle Cloud Storage Service Instance .................................. 42 4.17 Creating a Cloud Backup on an OpenStack Object Storage .................................................. 43 4.18 Creating a Cloud Backup on Amazon S3 ............................................................................. 43 4.19 Extract an Existing Image from an Oracle Storage Cloud Service instance to a Backup Directory ..................................................................................................................................... 43 4.20 Extract an Existing Image from Amazon S3 Cloud Storage to a Backup Directory ................... 43 4.21 Making an Uncompressed Partial Backup of InnoDB Tables .................................................. 53 4.22 Making a Compressed Partial Backup .................................................................................. 53 4.23 Optimistic Backup Using the Option optimistic-time=YYMMDDHHMMSS ............................. 55 4.24 Optimistic Backup Using the Option optimistic-time=now ............................................... 55 4.25 Optimistic Backup Using the optimistic-busy-tables Option ......................................... 55 4.26 Optimistic and Partial Backup Using both the optimistic-busy-tables and optimistic-time Options ....................................................................................................... 55 5.1 Restoring a Database ........................................................................................................... 59 5.2 Restoring a Compressed Backup ........................................................................................... 60 5.3 Restoring a Compressed Directory Backup ............................................................................ 61 5.4 Restoring a Compressed and Prepared Directory Backup ....................................................... 61 5.5 Restoring an Encrypted Backup Image .................................................................................. 61 5.6 Restoring an Incremental Backup Image ................................................................................ 61 5.7 Restoring Selected Tables from a TTS Image Backup ............................................................ 63 5.8 Restoring and Renaming a Table from a TTS Backup ............................................................ 63 5.9 Restoring a Single-file Backup from an Oracle Cloud Storage Service Instance to a MySQL Server ........................................................................................................................................ 63 5.10 Restoring a Single-file Backup from an OpenStack Object Storage to a MySQL Server ............ 63 5.11 Restoring a Single-file Backup from Amazon S3 to a MySQL Server ...................................... 63 5.12 Restoring a Backup Directory using copy-back-and-apply-log ....................................... 64 5.13 Applying the Log to a Backup .............................................................................................. 64 5.14 Applying the Log to a Compressed Backup .......................................................................... 64 9.1 Sample mysqlbackup Commands Using MySQL Enterprise Backup with Oracle Secure Backup ....................................................................................................................................... 79 14.1 Apply Log to Full Backup .................................................................................................. 103 16.1 Example backup-my.cnf file ........................................................................................... 155 vii
viii
分享到:
收藏