SlideShare a Scribd company logo
1 of 37
Download to read offline
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2
Backing Up the MySQL
Database
Sanjay Manwani
MySQL India Director
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4
Program Agenda
 Understanding Backup
 MySQL Enterprise Backup (MEB)
 Backup Strategies
 What’s New in MEB 3.9
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5
Understanding Backup
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6
Why Backup is important
 Audits
 Disasters
 Is HA setup a backup ?
 Is LVM a backup ?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7
Types of Backup and Tools for these types
 Logical
– Mysqldump
– Mysqldbexport/import
 Physical
– MySQL Enterprise Backup (MEB)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8
Logical Backup
 Advantages
– Easy of use - simple commands allow you to easily backup and restore
– Good for small database or tables – minimum impact on backup and
restore performance
– Flexibility – logical backup allows you to choose what you want to backup
and not backup. Change the scripts to restore partially etc.
– Readability - Good assurance that database files are not corrupt - all the
data is read and it is read using standard SQL queries.
Collection of SQL Queries to recreate the database
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9
Logical Backup
 Disadvantages
– Not an online solution - write operations are locked while performing the
backup, thereby blocking use of the database.
– Poor performance for larger databases – backup and especially restore
times are very slow for larger databases.
– Not consistent – database won’t necessarily be restored to a consistent
state.
– No incremental backup – all backups are full backups, can be time
consuming and require more storage.
Collection of SQL Queries to recreate the database
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10
Physical Backup (MEB)
 Advantages
– Performance –faster for backups and faster for restore
– Flexible – support for incremental backups, partial backups, backup
compression, point in time recovery and more.
– Archival Backups – suitable archival format for historical purposes
– Scalable – performance is near linear for larger databases.
– Consistent – delivers consistent point in time recovery
Copy of the internal files that constitute the MySQL database
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11
Physical v/s Logical
Backup
0
1
2
3
4
5
6
Category 1 Category 2 Category 3 Category 4
Series 1 Series 2 Series 3
Comparison Summary
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12
MySQL Enterprise Backup
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13
MEB Backup
 Full Backup
 Incremental Backup – File based
and Redo log only
 Compressed Backup
 Backup to Single File/Image
 Backup to tape
 Partial Backup
What is methods are available to choose from
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14
MEB – Apply log
 InnoDB consists of pages with
information about the LSN
number applicable to the page
 Applylog scans the InnoDB redo
log and applies the relavant
changes to the InnoDB page and
upto the correct LSN to be
applied
The intermediate step
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15
MEB – Recovery
 Copyback
 New! copyback-and-apply-log
 Validate
Recovery is what is important
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16
MEB Single image manipulation
 validate
– Ensure that the checksums are consistent
 list image
– Find the files that this image contains
 Extract
– Extract files from the image
 image-to-backup-dir
– Extract the full image into a directory
 backup-dir-to-image
– Convert a backup directory into a image
Manage the backup archive/image
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17
Some internal performance benchmarks
 1.2 TB of Data was generated using TPC-H
 Linux 2.6.32-220.2.1.el6.x86_64 OEL6.2/64 32 GB, 8 x 3000 MHz (8), 2X2 TB 2X1TB Disk, 1
Graphs
0 20 40 60 80 100 120
Time (mm:ss)
Avg CPU%
Avg USER%
Avg. SYS%
Avg IOWAIT%
Compressed Image
Compress
Image
Backup
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18
MEB External Interaction
 Tape and Backup Solutions
– Oracle secure backup
– Netbackup
 Workbench
– Scheduling
– Monitoring
 MySQL Enterprise Monitor
– Advisors
MEB integrates with external products
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.19
SBT Interface
Tape and Backup Solutions
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20
Oracle Secure Backup
Tape and Backup Solutions
 A general-purpose network
data protection tool that
simplifies and automates
the backup and restore of
files on a file system.
 A media management
layer for Recovery
Manager through the SBT
interface.
 Integrates with a wide
variety of tertiary devices
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21
Workbench
MEB & Workbench
 Integrates with
MEB
 Allows setup of
automatic backup
schedules
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22
Workbench
MEB & Workbench
 Allows some
options
 Keeps information
about backups
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23
Workbench
MEB & Workbench
 Helps setup and
validates the
setup
 Helps in recovery
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24
MEM – MySQL Enterprise Monitor
 Integrates with MEB
 Generates events if
the backup is not
taken within specified
amount of time
MEB advisors in MEM
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25
MEM
 Allows thresholds to be
set
 Advises users to backup
within their thresholds
MEB advisors in MEM
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.26
Backup Strategies
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27
Backup Strategies
 Always need to be tailored based on environment
– data growth, read v/s write usage, size of DB, user base, distribution
 Based on backup policies of your organization
 Account for spurts in data growth
 Account for schema modification – Before and after
 Needs to take into account quiet periods
 Needs to take into account your H/W and storage infrastructure
 IMPORTANTLY – Based on your restore requirement
.
A comprehensive plan for backup and recovery
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.28
Example Backup Strategy
A comprehensive plan for backup and recovery
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.29
Example Recovery Strategy
A comprehensive plan for backup and recovery
Recover
log to Full
Backup
• For past 3 days
Recover
Incremental
Backup
• 3 days to 1 week
Archive
Backup
• Archive full
backups more
than 1 week old
to tape.
• Delete backups
more than 6
months old
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.30
Validate
No backup strategy is complete without validating backup
Validate
by MEB
command
• Every week
Validate
by
reinstall
• Every
month
Reinstall
and run
regression
• Every 2
months
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31
What’s New in MEB 3.9
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32
What’s New in MEB
 New! Single Step
– Restore directly.
 New! Full Instance
– Config/Settings/…
 New! Selective
– Leverages TTS
– Great for large tables
 New! Skip Unused Pages
– Reduces space
 Continuous progress
– %, Bytes, Status
 Monitor disk space
– Optional actions
 Warn & Retry, Abort, Remove
Usability, usability usability
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33
Selective backup with TTS
 MySQL 5.6 feature : Transportable Table spaces
– Online table portability : Import/Export
 Why use with MEB
– Locking time
– Ease of use
What is TTS, why better than normal partial backup
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34
Skip Unused pages
 InnoDB files don’t shrink
 A small DB has many unused pages
 There is a performance penalty
Cleaning up before a backup
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35
References
 MySQL Enterprise Backup: Product Information
– www.mysql.com/products/enterprise/backup.html
 MySQL Enterprise Backup Team Blog
– https://blogs.oracle.com/mysqlenterprisebackup/
 MySQL Enterprise Backup: Documentation
– dev.mysql.com/doc/mysql-enterprise-backup/3.9/en/index.html
 How Do I get it
– https://edelivery.oracle.com
 Support and patches (My Oracle Support = MOS)
– https://support.oracle.com
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37
Graphic Section Divider

More Related Content

What's hot

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
 
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 Backup and Security Best Practices
MySQL Backup and Security Best PracticesMySQL Backup and Security Best Practices
MySQL Backup and Security Best PracticesLenz Grimmer
 
All types of backups and restore
All types of backups and restoreAll types of backups and restore
All types of backups and restoreVasudeva Rao
 
Less09 managing undo data
Less09 managing undo dataLess09 managing undo data
Less09 managing undo dataImran Ali
 
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
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
Less05 asm instance
Less05 asm instanceLess05 asm instance
Less05 asm instanceAmit Bhalla
 
Less06 networking
Less06 networkingLess06 networking
Less06 networkingAmit Bhalla
 
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
 
Inno db datafiles backup and retore
Inno db datafiles backup and retoreInno db datafiles backup and retore
Inno db datafiles backup and retoreVasudeva Rao
 
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
 

What's hot (20)

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
 
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 Backup and Security Best Practices
MySQL Backup and Security Best PracticesMySQL Backup and Security Best Practices
MySQL Backup and Security Best Practices
 
MySQL DBA
MySQL DBAMySQL DBA
MySQL DBA
 
All types of backups and restore
All types of backups and restoreAll types of backups and restore
All types of backups and restore
 
Less03 db dbca
Less03 db dbcaLess03 db dbca
Less03 db dbca
 
Less10 undo
Less10 undoLess10 undo
Less10 undo
 
Less09 managing undo data
Less09 managing undo dataLess09 managing undo data
Less09 managing undo data
 
MySQL database
MySQL databaseMySQL database
MySQL database
 
Less08 users
Less08 usersLess08 users
Less08 users
 
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
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
Less05 asm instance
Less05 asm instanceLess05 asm instance
Less05 asm instance
 
Less07 storage
Less07 storageLess07 storage
Less07 storage
 
Less06 networking
Less06 networkingLess06 networking
Less06 networking
 
Less09 locking
Less09 lockingLess09 locking
Less09 locking
 
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
 
My sql storage engines
My sql storage enginesMy sql storage engines
My sql storage engines
 
Inno db datafiles backup and retore
Inno db datafiles backup and retoreInno db datafiles backup and retore
Inno db datafiles backup and retore
 
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
 

Similar to Backing Up the MySQL Database

MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosKeith Hollman
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recoveryasifmalik110
 
8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptxRaniVuppal
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationYudi Herdiana
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Applianceomnidba
 
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!Tinku Ajit
 
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for cloudsOracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for cloudsGeneXus
 
Best Practices with IPS on Oracle Solaris 11
Best Practices with IPS on Oracle Solaris 11Best Practices with IPS on Oracle Solaris 11
Best Practices with IPS on Oracle Solaris 11glynnfoster
 
Data protection for oracle databases
Data protection for oracle databasesData protection for oracle databases
Data protection for oracle databasessolarisyougood
 
MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016Ted Wennmark
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMark Leith
 
Making Backups in Extreme Situations
Making Backups in Extreme SituationsMaking Backups in Extreme Situations
Making Backups in Extreme SituationsSveta Smirnova
 
Mysql Replication Excerpt 5.1 En
Mysql Replication Excerpt 5.1 EnMysql Replication Excerpt 5.1 En
Mysql Replication Excerpt 5.1 Enliufabin 66688
 
206510 p6 upgrade considerations
206510 p6 upgrade considerations206510 p6 upgrade considerations
206510 p6 upgrade considerationsp6academy
 
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15Symantec
 
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014Joelith
 
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloudC6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloudDr. Wilfred Lin (Ph.D.)
 
MySQL enterprise backup overview
MySQL enterprise backup overviewMySQL enterprise backup overview
MySQL enterprise backup overview郁萍 王
 
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014Dave Stokes
 

Similar to Backing Up the MySQL Database (20)

MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
 
8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx8392-exadatamaa-1887964.pptx
8392-exadatamaa-1887964.pptx
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for Consolidation
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Appliance
 
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!
 
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for cloudsOracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
Best Practices with IPS on Oracle Solaris 11
Best Practices with IPS on Oracle Solaris 11Best Practices with IPS on Oracle Solaris 11
Best Practices with IPS on Oracle Solaris 11
 
Data protection for oracle databases
Data protection for oracle databasesData protection for oracle databases
Data protection for oracle databases
 
MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema Improvements
 
Making Backups in Extreme Situations
Making Backups in Extreme SituationsMaking Backups in Extreme Situations
Making Backups in Extreme Situations
 
Mysql Replication Excerpt 5.1 En
Mysql Replication Excerpt 5.1 EnMysql Replication Excerpt 5.1 En
Mysql Replication Excerpt 5.1 En
 
206510 p6 upgrade considerations
206510 p6 upgrade considerations206510 p6 upgrade considerations
206510 p6 upgrade considerations
 
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15
WHITE PAPER▶ Protecting Microsoft SQL with Backup Exec 15
 
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
High Availability and Disaster Recovery Topologies - OMF Canberra June 2014
 
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloudC6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
 
MySQL enterprise backup overview
MySQL enterprise backup overviewMySQL enterprise backup overview
MySQL enterprise backup overview
 
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
MySQL 5.7 New Features to Exploit -- PHPTek/Chicago MySQL User Group May 2014
 

Recently uploaded

8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCRashishs7044
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environmentelijahj01012
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFChandresh Chudasama
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Peter Ward
 
8447779800, Low rate Call girls in Dwarka mor Delhi NCR
8447779800, Low rate Call girls in Dwarka mor Delhi NCR8447779800, Low rate Call girls in Dwarka mor Delhi NCR
8447779800, Low rate Call girls in Dwarka mor Delhi NCRashishs7044
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxappkodes
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Chapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditChapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditNhtLNguyn9
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 

Recently uploaded (20)

Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environment
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDF
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
 
Call Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North GoaCall Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North Goa
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...
 
8447779800, Low rate Call girls in Dwarka mor Delhi NCR
8447779800, Low rate Call girls in Dwarka mor Delhi NCR8447779800, Low rate Call girls in Dwarka mor Delhi NCR
8447779800, Low rate Call girls in Dwarka mor Delhi NCR
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptx
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Chapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditChapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal audit
 
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 

Backing Up the MySQL Database

  • 1. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
  • 2. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2 Backing Up the MySQL Database Sanjay Manwani MySQL India Director
  • 3. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3
  • 4. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4 Program Agenda  Understanding Backup  MySQL Enterprise Backup (MEB)  Backup Strategies  What’s New in MEB 3.9
  • 5. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5 Understanding Backup
  • 6. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6 Why Backup is important  Audits  Disasters  Is HA setup a backup ?  Is LVM a backup ?
  • 7. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7 Types of Backup and Tools for these types  Logical – Mysqldump – Mysqldbexport/import  Physical – MySQL Enterprise Backup (MEB)
  • 8. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8 Logical Backup  Advantages – Easy of use - simple commands allow you to easily backup and restore – Good for small database or tables – minimum impact on backup and restore performance – Flexibility – logical backup allows you to choose what you want to backup and not backup. Change the scripts to restore partially etc. – Readability - Good assurance that database files are not corrupt - all the data is read and it is read using standard SQL queries. Collection of SQL Queries to recreate the database
  • 9. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9 Logical Backup  Disadvantages – Not an online solution - write operations are locked while performing the backup, thereby blocking use of the database. – Poor performance for larger databases – backup and especially restore times are very slow for larger databases. – Not consistent – database won’t necessarily be restored to a consistent state. – No incremental backup – all backups are full backups, can be time consuming and require more storage. Collection of SQL Queries to recreate the database
  • 10. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10 Physical Backup (MEB)  Advantages – Performance –faster for backups and faster for restore – Flexible – support for incremental backups, partial backups, backup compression, point in time recovery and more. – Archival Backups – suitable archival format for historical purposes – Scalable – performance is near linear for larger databases. – Consistent – delivers consistent point in time recovery Copy of the internal files that constitute the MySQL database
  • 11. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11 Physical v/s Logical Backup 0 1 2 3 4 5 6 Category 1 Category 2 Category 3 Category 4 Series 1 Series 2 Series 3 Comparison Summary
  • 12. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12 MySQL Enterprise Backup
  • 13. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13 MEB Backup  Full Backup  Incremental Backup – File based and Redo log only  Compressed Backup  Backup to Single File/Image  Backup to tape  Partial Backup What is methods are available to choose from
  • 14. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14 MEB – Apply log  InnoDB consists of pages with information about the LSN number applicable to the page  Applylog scans the InnoDB redo log and applies the relavant changes to the InnoDB page and upto the correct LSN to be applied The intermediate step
  • 15. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15 MEB – Recovery  Copyback  New! copyback-and-apply-log  Validate Recovery is what is important
  • 16. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16 MEB Single image manipulation  validate – Ensure that the checksums are consistent  list image – Find the files that this image contains  Extract – Extract files from the image  image-to-backup-dir – Extract the full image into a directory  backup-dir-to-image – Convert a backup directory into a image Manage the backup archive/image
  • 17. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17 Some internal performance benchmarks  1.2 TB of Data was generated using TPC-H  Linux 2.6.32-220.2.1.el6.x86_64 OEL6.2/64 32 GB, 8 x 3000 MHz (8), 2X2 TB 2X1TB Disk, 1 Graphs 0 20 40 60 80 100 120 Time (mm:ss) Avg CPU% Avg USER% Avg. SYS% Avg IOWAIT% Compressed Image Compress Image Backup
  • 18. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18 MEB External Interaction  Tape and Backup Solutions – Oracle secure backup – Netbackup  Workbench – Scheduling – Monitoring  MySQL Enterprise Monitor – Advisors MEB integrates with external products
  • 19. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.19 SBT Interface Tape and Backup Solutions
  • 20. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20 Oracle Secure Backup Tape and Backup Solutions  A general-purpose network data protection tool that simplifies and automates the backup and restore of files on a file system.  A media management layer for Recovery Manager through the SBT interface.  Integrates with a wide variety of tertiary devices
  • 21. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21 Workbench MEB & Workbench  Integrates with MEB  Allows setup of automatic backup schedules
  • 22. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22 Workbench MEB & Workbench  Allows some options  Keeps information about backups
  • 23. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23 Workbench MEB & Workbench  Helps setup and validates the setup  Helps in recovery
  • 24. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24 MEM – MySQL Enterprise Monitor  Integrates with MEB  Generates events if the backup is not taken within specified amount of time MEB advisors in MEM
  • 25. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.25 MEM  Allows thresholds to be set  Advises users to backup within their thresholds MEB advisors in MEM
  • 26. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.26 Backup Strategies
  • 27. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.27 Backup Strategies  Always need to be tailored based on environment – data growth, read v/s write usage, size of DB, user base, distribution  Based on backup policies of your organization  Account for spurts in data growth  Account for schema modification – Before and after  Needs to take into account quiet periods  Needs to take into account your H/W and storage infrastructure  IMPORTANTLY – Based on your restore requirement . A comprehensive plan for backup and recovery
  • 28. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.28 Example Backup Strategy A comprehensive plan for backup and recovery
  • 29. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.29 Example Recovery Strategy A comprehensive plan for backup and recovery Recover log to Full Backup • For past 3 days Recover Incremental Backup • 3 days to 1 week Archive Backup • Archive full backups more than 1 week old to tape. • Delete backups more than 6 months old
  • 30. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.30 Validate No backup strategy is complete without validating backup Validate by MEB command • Every week Validate by reinstall • Every month Reinstall and run regression • Every 2 months
  • 31. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.31 What’s New in MEB 3.9
  • 32. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.32 What’s New in MEB  New! Single Step – Restore directly.  New! Full Instance – Config/Settings/…  New! Selective – Leverages TTS – Great for large tables  New! Skip Unused Pages – Reduces space  Continuous progress – %, Bytes, Status  Monitor disk space – Optional actions  Warn & Retry, Abort, Remove Usability, usability usability
  • 33. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.33 Selective backup with TTS  MySQL 5.6 feature : Transportable Table spaces – Online table portability : Import/Export  Why use with MEB – Locking time – Ease of use What is TTS, why better than normal partial backup
  • 34. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.34 Skip Unused pages  InnoDB files don’t shrink  A small DB has many unused pages  There is a performance penalty Cleaning up before a backup
  • 35. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.35 References  MySQL Enterprise Backup: Product Information – www.mysql.com/products/enterprise/backup.html  MySQL Enterprise Backup Team Blog – https://blogs.oracle.com/mysqlenterprisebackup/  MySQL Enterprise Backup: Documentation – dev.mysql.com/doc/mysql-enterprise-backup/3.9/en/index.html  How Do I get it – https://edelivery.oracle.com  Support and patches (My Oracle Support = MOS) – https://support.oracle.com
  • 36. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.36
  • 37. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.37 Graphic Section Divider