SlideShare a Scribd company logo
1 of 50
Download to read offline
MySQL
Backup & Recovery
Essentials
Ronald Bradford
http://ronaldbradford.com
Buenos Aires, Argentina
2013-10
EffectiveMySQL.com - Performance, Scalability & Business Continuity
"No one cares if you can
backup, only that you
can restore."
Adapted from W. Curtis Preston - Backup & Recovery (O'Reilly 2009)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Agenda
Backup Options
Tools available
Restore Options
Necessary Nomenclature
Business Requirements
Slides at http://j.mp/EM-BandR
EffectiveMySQL.com - Performance, Scalability & Business Continuity
ABOUT AUTHOR
Ronald Bradford
All time top MySQL blogger
Published Author (4++ books)
Oracle ACE Director
MySQL community member of the year (2009 & 2013)
24 years of RDBMS experience,14 years with MySQL
MySQL Inc (2006-2008)
Oracle Corporation (1996-1999)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Four Step
Overview

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Basics
1

Static Consistent Backup
+
Master Binary Logs

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Recovery Basics
2

Static Restore
+
Point in Time Recovery

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Verification
Necessary at EVERY step

3

Commands complete without error
No errors in logs
Results match expectations
Approximate
Precise
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Testing
4

“Testing is about trying to
break your software, not
checking that it works!”
Ronald Bradford, circa 2006

EffectiveMySQL.com - Performance, Scalability & Business Continuity
"MySQL has no single
unbreakable backup
solution [yet]."

EffectiveMySQL.com - Performance, Scalability & Business Continuity
B&R Options

EffectiveMySQL.com - Performance, Scalability & Business Continuity
B&R Options
Included

Open Source

mysqldump

XtraBackup

OS filecopy

mydumper

OS Specific

Commercial

filesystem snapshot

MEB

EffectiveMySQL.com - Performance, Scalability & Business Continuity
EXAMPLE DB
SELECT

FROM

SUM(data_length+index_length)/1024/1024 AS total_mb,
SUM(data_length)/1024/1024 AS data_mb,
SUM(index_length)/1024/1024 AS index_mb,
COUNT(DISTINCT table_schema) AS schema_cnt,
COUNT(*) AS tables,
CURDATE() AS today,
VERSION()
information_schema.tablesG

*************************** 1. row ***************************
total_mb: 5344.63
data_mb: 4545.49
index_mb: 799.13
TIP: Your daily verification
schema_cnt: 7
step should include this
tables: 103
today: 2012-04-03
VERSION(): 5.1.61-0ubuntu0.11.10.1-log

Available on GitHub with Effective
MySQL: Backup and Recovery Book

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
mysqldump

Pros
Included with MySQL server
ASCII output
SQL statement
Remote capabilities

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
mysqldump

Cons
Single threaded
Locking by default (*)
Slow restore for large DBs
Single threaded

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
mysqldump

Recommendations
Great for 5-10GB
No locking with InnoDB (*)
Essential for recording schema
objects

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
mysqldump USAGE
$ time mysqldump --all-databases > /mysql/backup/dump1.sql
real
1m31.631s
user
1m12.533s
sys
0m10.893s
$ echo $?
0
$ ls -lh /mysql/backup/dump1.sql
-rw-rw-r-- 1 uid gid 2.9G 2012-04-03 03:04 /mysql/
backup/dump1.sql
TIP: Always time and record long
running processes for verification

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Restore Options
mysqldump USAGE
$ time mysql –u[user] -p -f < dump1.sql > dump1.out 2>&1
real
14m13.817s
user
1m6.960s
sys
0m1.516s
$ echo $?
0
$ ls -l dump1.out
-rw-rw-r-- 1 uid gid 0 2012-04-08 04:07 dump1.out

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
mysqldump USAGE
$ mysqldump --all-databases --no-data 
> /mysql/backup/schema.sql
$ mysqldump --all-databases --no-data --no-create-info 
--events --routines > /mysql/backup/objects.sql

TIP: Include daily dumps of
database objects

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
VERIFICATION
$ mysqldump --all-databases --no-data --no-create-info 
--events --routines > /mysql/backup/objects.sql
mysqldump: Got error: 1142: SELECT,LOCK TABL command
denied to user 'root'@'localhost' for table
'cond_instances' when using LOCK TABLES
$ echo $?
2
TIP: Error checking is
essential and easy to implement

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
File Copy

Pros
No software needed
Consistent

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
File Copy

Cons
MySQL unavailable
Not consistent (**)
Time to warm server caches
Restore must match configuration
Must backup right files
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
File Copy

Recommendations
Great for slaves
When access disabled

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
File Copy USAGE
$ sudo service mysql stop
$ sudo /etc/init.d/mysqld stop
$
$
$
$
#

# Ubuntu
# RHEL

mkdir /mysql/backup/cp1
cp -r /var/lib/mysql /mysql/backup/cp1
echo $?
cp /etc/mysql/my.cnf /mysql/backup/cp1
Other directories?

$ sudo service mysql start

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
SNAPSHOT

Pros
Fastest
Database agnostic (*)

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
SNAPSHOT

Cons
Must be pre-configured (LVM)
Extra Disk I/O
Inconsistent (*)
FLUSH TABLES duration

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
SNAPSHOT USAGE
$
$
$
$
$
$

sudo su sync ; lvcreate -L1G -s -n dbsnapshot /dev/db/p0
mkdir -p /mnt/dbsnapshot
mount -o ro /dev/db/dbsnapshot /mnt/dbsnapshot
du -sh /mnt/dbsnapshot
ls -al /mnt/dbsnapshot

$ mkdir /mysql/backup/snapshot1
$ cp -r /mnt/dbsnapshot/* /mysql/backup/snapshot1
$ sudo su $ mylvmbackup

TIP: mylvmbackup does all the
hard work

http://effectiveMySQL.com/article/configuring-a-new-hard-drive-for-lvm
http://effectiveMySQL.com/article/using-mysql-with-lvm
http://www.lenzg.net/mylvmbackup/

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
XtraBACKUP

Pros
Non-blocking (InnoDB)
Open Source
Supports incremental, compression etc

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
XtraBACKUP

Cons
Blocking for non-InnoDB tables

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
XtraBACKUP USAGE
$ time innobackupex --defaults-file=/etc/mysql/my.cnf 
--user=root --password=passwd --no-timestamp 
/mysql/backup/xtrabackup/first
real
2m30.667s
user
0m21.933s
sys
0m14.713s
$ echo $?
0

EffectiveMySQL.com - Performance, Scalability & Business Continuity
restore Options
XtraBACKUP USAGE
$
$
$
$
$

sudo
sudo
sudo
sudo
sudo

su – mysql
service mysql stop
# Ubuntu
rm -rf /var/lib/mysql # data directory
mkdir -m /var/lib/mysql
chown mysql:mysql /var/lib/mysql

$ time innobackupex --copy-back 
/mysql/backup/xtrabackup/first/
$ echo $?

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
MySQL ENTERPRISE BACKUP (MEB)

Pros
Non Blocking (InnoDB)
Commercial Support
Supports incremental, compression etc
media management software (MMS)
Oracle Secure Backup (OSB) - SBT
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
MySQL ENTERPRISE BACKUP (MEB)

Cons
Warm for non-InnoDB
Cost

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
MEB USAGE
$ sudo su - mysql
$ time /opt/meb/bin/mysqlbackup --user=root 
--password=passwd 
--backup-dir=/mysql/backup/meb/first 
backup-and-apply-log
real
3m30.879s
user
0m17.081s
sys
0m14.565s
$ echo $?
0
$ du -sh /mysql/backup/meb/first
5.6G
/mysql/backup/meb/first
$ ls -lh /mysql/backup/meb/first/datadir/ibd*
-rw-rw-r-- 1 uid gid 5.4G 2012-04-03 03:25 /mysql/
backup/meb/first/datadir/ibdata1

EffectiveMySQL.com - Performance, Scalability & Business Continuity
RESTORE Options
MEB USAGE
$
$
$
$
$

sudo
sudo
sudo
sudo
sudo

su – mysql
service mysql stop
# Ubuntu
rm -rf /var/lib/mysql # data directory
mkdir -m /var/lib/mysql
chown mysql:mysql /var/lib/mysql

$ time /opt/meb/bin/mysqlbackup 
--defaults-file=/etc/mysql/my.cnf 
--backup-dir=/mysql/backup/meb/first 
--innodb-log-files-in-group=2 copy-back
$ echo $?

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Point in Time

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Binary Logs
Possible with Binary Logs
#my.cnf
[mysqld]
log-bin=mysql-bin
expire-logs-days=5

WARNING: If you care
about your data, enable
binary logging

mysql> SHOW BINARY LOGS;
+------------------+-----------+
| Log_name
| File_size |
+------------------+-----------+
| mysql-bin.019662 | 104857736 |
| mysql-bin.019663 | 104857699 |
| mysql-bin.019664 | 104857850 |
$ ls -ltr /var/log/mysql | tail
-rw-rw---- 1 mysql adm 104857736 2011-09-04 22:00 mysql-bin.019662
-rw-rw---- 1 mysql adm 104857699 2011-09-04 22:08 mysql-bin.019663

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Options
cp
rsync
Slave --log-slave-updates
DRBD - Disk Replicated Block Device
mysqlbinlog --read-from-remote-server
(New in 5.6)
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup needs
Static Backup
Useless without Binary Log position
mysql> SHOW MASTER STATUSG
File: mysql-bin.020616
Position: 63395562
Binlog_Do_DB:
Binlog_Ignore_DB:

WARNING: Can work on
slave and provide the wrong
information

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Backup Needs
$ mysqldump --master-data
(or --dump-slave)
CHANGE MASTER TO MASTER_HOST='10.0.0.1', MASTER_USER
='repl',MASTER_PASSWORD='******', MASTER_LOG_FILE=
'mysql-bin.000146', MASTER_LOG_POS=810715371;

Xtrabackup
$ cat xtrabackup_binlog_info
mysql-bin.000001
37522

MEB
$ grep binlog meta/backup_variables.txt
binlog_position=mysql-bin.000017:5555

mydumper
$ cat export-20120407-230027/metadata
Log: mysql-bin.000017 Pos: 8328

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Restore Options
mysqlbinlog
$ mysqlbinlog /path/to/mysql-bin.000146 
--start-position=810715371 | mysql -uroot -p
$ mysqlbinlog /path/to/mysql-bin.000147 
/path/to/mysql-bin.00148 ... etc | mysql -uroot -p

MySQL replication

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Advanced
Features

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Advanced
Compression
Incremental
Remote
Parallel
Partial
For another presentation

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Compression
Utility

Comp (s)

Dec (s)

Saving

lzo (-3)
pigz (-1)
pigz [-6]
gzip [-6]
bzip2
lzo (-9)
lzma
xz

21
43
105
232
540
20m
58m
59m

34
33
25
78
175
82
180
160

48%
64%
69%
69%
74%
58%
78%
78%
Depends greatly on data types

EffectiveMySQL.com - Performance, Scalability & Business Continuity
Terminology
MTTD - Mean Time To Detect
MTTR - Mean Time to Recover
RPO - Recovery Point Objective
RDO - Recovery Data Objective
SLA - Service Level Agreement
Determining business priorities is
important for any strategy
EffectiveMySQL.com - Performance, Scalability & Business Continuity
Conclusion

EffectiveMySQL.com - Performance, Scalability & Business Continuity
CONCLUsiON
This is an introduction
Advance features are important
Best option depends
Replication is important in your strategy
Test, Test, Test. - “Chaos Monkey”
Slides at http://j.mp/EM-BandR
EffectiveMySQL.com - Performance, Scalability & Business Continuity
PRESENTATIONS

More presentations at

http://ronaldbradford.com/mysql-presentations/
http://effectivemysql.com/presentation/

EffectiveMySQL.com - Performance, Scalability & Business Continuity
220 pages dedicated to B&R

http://j.mp/EM-book2
Ronald Bradford
ronald@effectivemysql.com

More Related Content

What's hot

Backing Up the MySQL Database
Backing Up the MySQL DatabaseBacking Up the MySQL Database
Backing Up the MySQL DatabaseSanjay Manwani
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)Mydbops
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyContinuent
 
MySQL Performance Tuning Variables
MySQL Performance Tuning VariablesMySQL Performance Tuning Variables
MySQL Performance Tuning VariablesFromDual GmbH
 
Meb Backup & Recovery Performance
Meb Backup & Recovery PerformanceMeb Backup & Recovery Performance
Meb Backup & Recovery PerformanceKeith Hollman
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourRonald Bradford
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosKeith Hollman
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersRonald Bradford
 
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015Dave Stokes
 
MySQL Enterprise Backup
MySQL Enterprise BackupMySQL Enterprise Backup
MySQL Enterprise BackupMark Swarbrick
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16Sanjay Manwani
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUGKeith Hollman
 
Upgrading mysql version 5.5.30 to 5.6.10
Upgrading mysql version 5.5.30 to 5.6.10Upgrading mysql version 5.5.30 to 5.6.10
Upgrading mysql version 5.5.30 to 5.6.10Vasudeva Rao
 
My sql storage engines
My sql storage enginesMy sql storage engines
My sql storage enginesVasudeva Rao
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningLenz Grimmer
 
MySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online RecoveryMySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online RecoveryKeith Hollman
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTNRonald Bradford
 

What's hot (20)

Backing Up the MySQL Database
Backing Up the MySQL DatabaseBacking Up the MySQL Database
Backing Up the MySQL Database
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
MySQL Performance Tuning Variables
MySQL Performance Tuning VariablesMySQL Performance Tuning Variables
MySQL Performance Tuning Variables
 
Meb Backup & Recovery Performance
Meb Backup & Recovery PerformanceMeb Backup & Recovery Performance
Meb Backup & Recovery Performance
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
 
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
 
MySQL Enterprise Backup
MySQL Enterprise BackupMySQL Enterprise Backup
MySQL Enterprise Backup
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUGEmbracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG
 
Upgrading mysql version 5.5.30 to 5.6.10
Upgrading mysql version 5.5.30 to 5.6.10Upgrading mysql version 5.5.30 to 5.6.10
Upgrading mysql version 5.5.30 to 5.6.10
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
MySQL DBA
MySQL DBAMySQL DBA
MySQL DBA
 
My sql storage engines
My sql storage enginesMy sql storage engines
My sql storage engines
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery PlanningMySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
 
MySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online RecoveryMySQL Enterprise Backup: PITR Partial Online Recovery
MySQL Enterprise Backup: PITR Partial Online Recovery
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
 

Viewers also liked

MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsLenz Grimmer
 
MHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirksMHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirksColin Charles
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group ReplicationKenny Gryp
 
Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structurezhaolinjnu
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialKenny Gryp
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupKenny Gryp
 
Mysql参数-GDB
Mysql参数-GDBMysql参数-GDB
Mysql参数-GDBzhaolinjnu
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLOlivier DASINI
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!Vitor Oliveira
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)frogd
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...Sveta Smirnova
 
Hbase源码初探
Hbase源码初探Hbase源码初探
Hbase源码初探zhaolinjnu
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability MattersMatt Lord
 
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreSujatha Sivakumar
 
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication SetupsMix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication SetupsPedro Gomes
 

Viewers also liked (20)

MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
MHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirksMHA (MySQL High Availability): Getting started & moving past quirks
MHA (MySQL High Availability): Getting started & moving past quirks
 
Extensible Data Modeling
Extensible Data ModelingExtensible Data Modeling
Extensible Data Modeling
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structure
 
MySQL aio
MySQL aioMySQL aio
MySQL aio
 
MySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn TutorialMySQL Group Replication - HandsOn Tutorial
MySQL Group Replication - HandsOn Tutorial
 
Online MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackupOnline MySQL Backups with Percona XtraBackup
Online MySQL Backups with Percona XtraBackup
 
Mysql参数-GDB
Mysql参数-GDBMysql参数-GDB
Mysql参数-GDB
 
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQLMySQL InnoDB Cluster - A complete High Availability solution for MySQL
MySQL InnoDB Cluster - A complete High Availability solution for MySQL
 
MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!MySQL Replication Performance Tuning for Fun and Profit!
MySQL Replication Performance Tuning for Fun and Profit!
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...
 
Hbase源码初探
Hbase源码初探Hbase源码初探
Hbase源码初探
 
SQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and ProfitSQL Outer Joins for Fun and Profit
SQL Outer Joins for Fun and Profit
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 BangaloreMySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
MySQL InnoDB Cluster and Group Replication - OSI 2017 Bangalore
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
 
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication SetupsMix ‘n’ Match Async and Group Replication for Advanced Replication Setups
Mix ‘n’ Match Async and Group Replication for Advanced Replication Setups
 

Similar to MySQL Backup and Recovery Essentials

MySQL Enterprise Backup & Oracle Secure Backup
MySQL Enterprise Backup &  Oracle Secure BackupMySQL Enterprise Backup &  Oracle Secure Backup
MySQL Enterprise Backup & Oracle Secure BackupSanjay Manwani
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharingIvan Ma
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com JavaMySQL Brasil
 
My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)Gustavo Rene Antunez
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterKenny Gryp
 
MySQL Oslayer performace optimization
MySQL  Oslayer performace optimizationMySQL  Oslayer performace optimization
MySQL Oslayer performace optimizationLouis liu
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMark Leith
 
8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptxRaniVuppal
 
Making Backups in Extreme Situations
Making Backups in Extreme SituationsMaking Backups in Extreme Situations
Making Backups in Extreme SituationsSveta Smirnova
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10Kenny Gryp
 
My sql performance tuning course
My sql performance tuning courseMy sql performance tuning course
My sql performance tuning courseAlberto Centanni
 
Data Replication Options in AWS
Data Replication Options in AWSData Replication Options in AWS
Data Replication Options in AWSIrawan Soetomo
 
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke KajiyamaInsight Technology, Inc.
 
MySQL 内存分析
MySQL 内存分析MySQL 内存分析
MySQL 内存分析YUCHENG HU
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMark Leith
 

Similar to MySQL Backup and Recovery Essentials (20)

MySQL Enterprise Backup & Oracle Secure Backup
MySQL Enterprise Backup &  Oracle Secure BackupMySQL Enterprise Backup &  Oracle Secure Backup
MySQL Enterprise Backup & Oracle Secure Backup
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
 
Tutorial MySQL com Java
Tutorial MySQL com JavaTutorial MySQL com Java
Tutorial MySQL com Java
 
My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)My First 100 days with a MySQL DBMS (WP)
My First 100 days with a MySQL DBMS (WP)
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
MySQL Oslayer performace optimization
MySQL  Oslayer performace optimizationMySQL  Oslayer performace optimization
MySQL Oslayer performace optimization
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
MySQL Tech Tour Nov, 2013
MySQL Tech Tour Nov, 2013MySQL Tech Tour Nov, 2013
MySQL Tech Tour Nov, 2013
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx
 
Slides
SlidesSlides
Slides
 
Making Backups in Extreme Situations
Making Backups in Extreme SituationsMaking Backups in Extreme Situations
Making Backups in Extreme Situations
 
MySQL Database Architectures - 2020-10
MySQL Database Architectures -  2020-10MySQL Database Architectures -  2020-10
MySQL Database Architectures - 2020-10
 
My sql performance tuning course
My sql performance tuning courseMy sql performance tuning course
My sql performance tuning course
 
Data Replication Options in AWS
Data Replication Options in AWSData Replication Options in AWS
Data Replication Options in AWS
 
Mydumper
MydumperMydumper
Mydumper
 
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
 
MySQL 内存分析
MySQL 内存分析MySQL 内存分析
MySQL 内存分析
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema Improvements
 

More from Ronald Bradford

My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNRonald Bradford
 
MySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SFMySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SFRonald Bradford
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL ScalabilityRonald Bradford
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07Ronald Bradford
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLRonald Bradford
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteRonald Bradford
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance ImprovementsRonald Bradford
 
LIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBALIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBARonald Bradford
 
IGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBAIGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBARonald Bradford
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case StudyRonald Bradford
 
Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Ronald Bradford
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemRonald Bradford
 
MySQL for the Oracle DBA - Object Management
MySQL for the Oracle DBA - Object ManagementMySQL for the Oracle DBA - Object Management
MySQL for the Oracle DBA - Object ManagementRonald Bradford
 
Know Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionKnow Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionRonald Bradford
 
MySQL For Oracle Developers
MySQL For Oracle DevelopersMySQL For Oracle Developers
MySQL For Oracle DevelopersRonald Bradford
 
The Ideal Performance Architecture
The Ideal Performance ArchitectureThe Ideal Performance Architecture
The Ideal Performance ArchitectureRonald Bradford
 
Getting started with MySQL on Amazon Web Services
Getting started with MySQL on Amazon Web ServicesGetting started with MySQL on Amazon Web Services
Getting started with MySQL on Amazon Web ServicesRonald Bradford
 
Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1Ronald Bradford
 

More from Ronald Bradford (20)

My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
 
MySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SFMySQL Idiosyncrasies That Bite SF
MySQL Idiosyncrasies That Bite SF
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
 
MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07MySQL Idiosyncrasies That Bite 2010.07
MySQL Idiosyncrasies That Bite 2010.07
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQL
 
MySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That BiteMySQL Idiosyncrasies That Bite
MySQL Idiosyncrasies That Bite
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance Improvements
 
LIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBALIFTOFF - MySQLCamp for the Oracle DBA
LIFTOFF - MySQLCamp for the Oracle DBA
 
IGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBAIGNITION - MySQLCamp for the Oracle DBA
IGNITION - MySQLCamp for the Oracle DBA
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study
 
Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010Dolphins Now And Beyond - FOSDEM 2010
Dolphins Now And Beyond - FOSDEM 2010
 
Drizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and EcosystemDrizzle - Status, Principles and Ecosystem
Drizzle - Status, Principles and Ecosystem
 
SQL v No SQL
SQL v No SQLSQL v No SQL
SQL v No SQL
 
MySQL for the Oracle DBA - Object Management
MySQL for the Oracle DBA - Object ManagementMySQL for the Oracle DBA - Object Management
MySQL for the Oracle DBA - Object Management
 
Know Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionKnow Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express Edition
 
MySQL For Oracle Developers
MySQL For Oracle DevelopersMySQL For Oracle Developers
MySQL For Oracle Developers
 
The Ideal Performance Architecture
The Ideal Performance ArchitectureThe Ideal Performance Architecture
The Ideal Performance Architecture
 
MySQL Monitoring 101
MySQL Monitoring 101MySQL Monitoring 101
MySQL Monitoring 101
 
Getting started with MySQL on Amazon Web Services
Getting started with MySQL on Amazon Web ServicesGetting started with MySQL on Amazon Web Services
Getting started with MySQL on Amazon Web Services
 
Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 

MySQL Backup and Recovery Essentials

  • 1. MySQL Backup & Recovery Essentials Ronald Bradford http://ronaldbradford.com Buenos Aires, Argentina 2013-10 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 2. "No one cares if you can backup, only that you can restore." Adapted from W. Curtis Preston - Backup & Recovery (O'Reilly 2009) EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 3. Agenda Backup Options Tools available Restore Options Necessary Nomenclature Business Requirements Slides at http://j.mp/EM-BandR EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 4. ABOUT AUTHOR Ronald Bradford All time top MySQL blogger Published Author (4++ books) Oracle ACE Director MySQL community member of the year (2009 & 2013) 24 years of RDBMS experience,14 years with MySQL MySQL Inc (2006-2008) Oracle Corporation (1996-1999) EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 5. Four Step Overview EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 6. Backup Basics 1 Static Consistent Backup + Master Binary Logs EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 7. Recovery Basics 2 Static Restore + Point in Time Recovery EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 8. Verification Necessary at EVERY step 3 Commands complete without error No errors in logs Results match expectations Approximate Precise EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 9. Testing 4 “Testing is about trying to break your software, not checking that it works!” Ronald Bradford, circa 2006 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 10. "MySQL has no single unbreakable backup solution [yet]." EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 11. B&R Options EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 12. B&R Options Included Open Source mysqldump XtraBackup OS filecopy mydumper OS Specific Commercial filesystem snapshot MEB EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 13. EXAMPLE DB SELECT FROM SUM(data_length+index_length)/1024/1024 AS total_mb, SUM(data_length)/1024/1024 AS data_mb, SUM(index_length)/1024/1024 AS index_mb, COUNT(DISTINCT table_schema) AS schema_cnt, COUNT(*) AS tables, CURDATE() AS today, VERSION() information_schema.tablesG *************************** 1. row *************************** total_mb: 5344.63 data_mb: 4545.49 index_mb: 799.13 TIP: Your daily verification schema_cnt: 7 step should include this tables: 103 today: 2012-04-03 VERSION(): 5.1.61-0ubuntu0.11.10.1-log Available on GitHub with Effective MySQL: Backup and Recovery Book EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 14. Backup Options mysqldump Pros Included with MySQL server ASCII output SQL statement Remote capabilities EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 15. Backup Options mysqldump Cons Single threaded Locking by default (*) Slow restore for large DBs Single threaded EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 16. Backup Options mysqldump Recommendations Great for 5-10GB No locking with InnoDB (*) Essential for recording schema objects EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 17. Backup Options mysqldump USAGE $ time mysqldump --all-databases > /mysql/backup/dump1.sql real 1m31.631s user 1m12.533s sys 0m10.893s $ echo $? 0 $ ls -lh /mysql/backup/dump1.sql -rw-rw-r-- 1 uid gid 2.9G 2012-04-03 03:04 /mysql/ backup/dump1.sql TIP: Always time and record long running processes for verification EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 18. Restore Options mysqldump USAGE $ time mysql –u[user] -p -f < dump1.sql > dump1.out 2>&1 real 14m13.817s user 1m6.960s sys 0m1.516s $ echo $? 0 $ ls -l dump1.out -rw-rw-r-- 1 uid gid 0 2012-04-08 04:07 dump1.out EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 19. Backup Options mysqldump USAGE $ mysqldump --all-databases --no-data > /mysql/backup/schema.sql $ mysqldump --all-databases --no-data --no-create-info --events --routines > /mysql/backup/objects.sql TIP: Include daily dumps of database objects EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 20. Backup Options VERIFICATION $ mysqldump --all-databases --no-data --no-create-info --events --routines > /mysql/backup/objects.sql mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES $ echo $? 2 TIP: Error checking is essential and easy to implement EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 21. Backup Options File Copy Pros No software needed Consistent EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 22. Backup Options File Copy Cons MySQL unavailable Not consistent (**) Time to warm server caches Restore must match configuration Must backup right files EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 23. Backup Options File Copy Recommendations Great for slaves When access disabled EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 24. Backup Options File Copy USAGE $ sudo service mysql stop $ sudo /etc/init.d/mysqld stop $ $ $ $ # # Ubuntu # RHEL mkdir /mysql/backup/cp1 cp -r /var/lib/mysql /mysql/backup/cp1 echo $? cp /etc/mysql/my.cnf /mysql/backup/cp1 Other directories? $ sudo service mysql start EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 25. Backup Options SNAPSHOT Pros Fastest Database agnostic (*) EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 26. Backup Options SNAPSHOT Cons Must be pre-configured (LVM) Extra Disk I/O Inconsistent (*) FLUSH TABLES duration EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 27. Backup Options SNAPSHOT USAGE $ $ $ $ $ $ sudo su sync ; lvcreate -L1G -s -n dbsnapshot /dev/db/p0 mkdir -p /mnt/dbsnapshot mount -o ro /dev/db/dbsnapshot /mnt/dbsnapshot du -sh /mnt/dbsnapshot ls -al /mnt/dbsnapshot $ mkdir /mysql/backup/snapshot1 $ cp -r /mnt/dbsnapshot/* /mysql/backup/snapshot1 $ sudo su $ mylvmbackup TIP: mylvmbackup does all the hard work http://effectiveMySQL.com/article/configuring-a-new-hard-drive-for-lvm http://effectiveMySQL.com/article/using-mysql-with-lvm http://www.lenzg.net/mylvmbackup/ EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 28. Backup Options XtraBACKUP Pros Non-blocking (InnoDB) Open Source Supports incremental, compression etc EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 29. Backup Options XtraBACKUP Cons Blocking for non-InnoDB tables EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 30. Backup Options XtraBACKUP USAGE $ time innobackupex --defaults-file=/etc/mysql/my.cnf --user=root --password=passwd --no-timestamp /mysql/backup/xtrabackup/first real 2m30.667s user 0m21.933s sys 0m14.713s $ echo $? 0 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 31. restore Options XtraBACKUP USAGE $ $ $ $ $ sudo sudo sudo sudo sudo su – mysql service mysql stop # Ubuntu rm -rf /var/lib/mysql # data directory mkdir -m /var/lib/mysql chown mysql:mysql /var/lib/mysql $ time innobackupex --copy-back /mysql/backup/xtrabackup/first/ $ echo $? EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 32. Backup Options MySQL ENTERPRISE BACKUP (MEB) Pros Non Blocking (InnoDB) Commercial Support Supports incremental, compression etc media management software (MMS) Oracle Secure Backup (OSB) - SBT EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 33. Backup Options MySQL ENTERPRISE BACKUP (MEB) Cons Warm for non-InnoDB Cost EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 34. Backup Options MEB USAGE $ sudo su - mysql $ time /opt/meb/bin/mysqlbackup --user=root --password=passwd --backup-dir=/mysql/backup/meb/first backup-and-apply-log real 3m30.879s user 0m17.081s sys 0m14.565s $ echo $? 0 $ du -sh /mysql/backup/meb/first 5.6G /mysql/backup/meb/first $ ls -lh /mysql/backup/meb/first/datadir/ibd* -rw-rw-r-- 1 uid gid 5.4G 2012-04-03 03:25 /mysql/ backup/meb/first/datadir/ibdata1 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 35. RESTORE Options MEB USAGE $ $ $ $ $ sudo sudo sudo sudo sudo su – mysql service mysql stop # Ubuntu rm -rf /var/lib/mysql # data directory mkdir -m /var/lib/mysql chown mysql:mysql /var/lib/mysql $ time /opt/meb/bin/mysqlbackup --defaults-file=/etc/mysql/my.cnf --backup-dir=/mysql/backup/meb/first --innodb-log-files-in-group=2 copy-back $ echo $? EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 36. Point in Time EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 37. Binary Logs Possible with Binary Logs #my.cnf [mysqld] log-bin=mysql-bin expire-logs-days=5 WARNING: If you care about your data, enable binary logging mysql> SHOW BINARY LOGS; +------------------+-----------+ | Log_name | File_size | +------------------+-----------+ | mysql-bin.019662 | 104857736 | | mysql-bin.019663 | 104857699 | | mysql-bin.019664 | 104857850 | $ ls -ltr /var/log/mysql | tail -rw-rw---- 1 mysql adm 104857736 2011-09-04 22:00 mysql-bin.019662 -rw-rw---- 1 mysql adm 104857699 2011-09-04 22:08 mysql-bin.019663 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 38. Backup Options cp rsync Slave --log-slave-updates DRBD - Disk Replicated Block Device mysqlbinlog --read-from-remote-server (New in 5.6) EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 39. Backup needs Static Backup Useless without Binary Log position mysql> SHOW MASTER STATUSG File: mysql-bin.020616 Position: 63395562 Binlog_Do_DB: Binlog_Ignore_DB: WARNING: Can work on slave and provide the wrong information EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 40. Backup Needs $ mysqldump --master-data (or --dump-slave) CHANGE MASTER TO MASTER_HOST='10.0.0.1', MASTER_USER ='repl',MASTER_PASSWORD='******', MASTER_LOG_FILE= 'mysql-bin.000146', MASTER_LOG_POS=810715371; Xtrabackup $ cat xtrabackup_binlog_info mysql-bin.000001 37522 MEB $ grep binlog meta/backup_variables.txt binlog_position=mysql-bin.000017:5555 mydumper $ cat export-20120407-230027/metadata Log: mysql-bin.000017 Pos: 8328 EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 41. Restore Options mysqlbinlog $ mysqlbinlog /path/to/mysql-bin.000146 --start-position=810715371 | mysql -uroot -p $ mysqlbinlog /path/to/mysql-bin.000147 /path/to/mysql-bin.00148 ... etc | mysql -uroot -p MySQL replication EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 42. Advanced Features EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 44. Compression Utility Comp (s) Dec (s) Saving lzo (-3) pigz (-1) pigz [-6] gzip [-6] bzip2 lzo (-9) lzma xz 21 43 105 232 540 20m 58m 59m 34 33 25 78 175 82 180 160 48% 64% 69% 69% 74% 58% 78% 78% Depends greatly on data types EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 45. Terminology MTTD - Mean Time To Detect MTTR - Mean Time to Recover RPO - Recovery Point Objective RDO - Recovery Data Objective SLA - Service Level Agreement Determining business priorities is important for any strategy EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 46. Conclusion EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 47. CONCLUsiON This is an introduction Advance features are important Best option depends Replication is important in your strategy Test, Test, Test. - “Chaos Monkey” Slides at http://j.mp/EM-BandR EffectiveMySQL.com - Performance, Scalability & Business Continuity
  • 49. 220 pages dedicated to B&R http://j.mp/EM-book2