Download MySQL Enterprise Backup User`s Guide (Version 4.0.0)

Transcript
Table of Contents
Preface and Legal Notices ................................................................................................................ xi
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 ..................................................................... 16
1.3.3 Files Backed up for Data Stored with MyISAM and Other Storage Engines .......... 17
1.3.4 Files Generated by mysqlbackup ...................................................................... 17
2 Installing MySQL Enterprise Backup ...................................................................................... 19
3 What's New in MySQL Enterprise Backup 4.0? ...................................................................... 21
II Using MySQL Enterprise Backup ................................................................................................... 23
4 Backing Up a Database Server ............................................................................................. 27
4.1 Before the First Backup .............................................................................................. 27
4.1.1 Collect Database Information ........................................................................... 27
4.1.2 Grant MySQL Privileges to Backup Administrator .............................................. 29
4.1.3 Designate a Location for the Backup Directory .................................................. 30
4.2 The Typical Backup / Verify / Restore Cycle ................................................................ 30
4.2.1 Backing Up an Entire MySQL Instance ............................................................. 30
4.2.2 Verifying a Backup .......................................................................................... 32
4.2.3 Restoring a Database ...................................................................................... 33
4.3 Backup Scenarios and Examples ................................................................................ 36
4.3.1 Making a Single-File Backup ............................................................................ 36
4.3.2 Making a Full Backup ...................................................................................... 40
4.3.3 Making a Differential or Incremental Backup ..................................................... 41
4.3.4 Making a Compressed Backup ......................................................................... 45
4.3.5 Making a Partial Backup .................................................................................. 46
4.3.6 Making an Optimistic Backup ........................................................................... 50
4.3.7 Making a Back Up of In-Memory Database Data ............................................... 52
4.3.8 Making Scheduled Backups ............................................................................. 52
4.4 Making Backups with a Distributed File System (DFS) or Storage Access Network
(SAN) .............................................................................................................................. 53
5 Recovering or Restoring a Database ..................................................................................... 55
5.1 Performing a Restore Operation ................................................................................. 55
5.1.1 Restoring a Compressed Backup ..................................................................... 56
5.1.2 Restoring an Encrypted Backup Image ............................................................. 56
5.1.3 Restoring an Incremental Backup ..................................................................... 57
5.1.4 Restoring Backups Created with the --use-tts Option .................................... 58
5.1.5 Restoring a Backup from Cloud Storage to a MySQL Server .............................. 58
5.1.6 Advanced: Restoring a Directory Backup .......................................................... 59
5.2 Point-in-Time Recovery from a Hot Backup ................................................................. 60
5.3 Restoring a Backup with a Database Upgrade or Downgrade ....................................... 61
6 Using MySQL Enterprise Backup with Replication .................................................................. 63
6.1 Setting Up a New Replication Slave ............................................................................ 63
6.2 Backing up and Restoring a Slave Database ............................................................... 64
6.3 Restoring a Master Database ..................................................................................... 65
7 Performance Considerations for MySQL Enterprise Backup ..................................................... 67
7.1 Optimizing Backup Performance ................................................................................. 67
7.2 Optimizing Restore Performance ................................................................................. 70
8 Encryption for Backups ......................................................................................................... 73
iii