SlideShare a Scribd company logo
<Insert Picture Here>
MySQL Enterprise Backup
Better Very Large Database Backup & Recovery and More!
Gagan Goel
MEB Software development manager
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing
decisions.
The development, release, and timing of any features or functionality
described for Oracle’s products remains at the sole discretion of
Oracle.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Why backups?
• Data is your most valuable IP. You have to protect it from loss.
• Disaster Recovery
– Hardware, Software, Developer or DBA (Pilot) error
• Migration and Upgrades - Change Hardware – serve or storage
• Create replica’s for HA setup
• Archival – requirements to keep data for X number of years
• Move chunks of data
• Setup Test environments
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Types of Backup and Tools for these types
• Logical
– Mysqldump
– Mysqlpump
• Next Generation for logical backup
• Physical
– MySQL Enterprise Backup (MEB)
• Other
– Snapshots
– Replicas
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
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.
– Portable – use across various OS and MySQL versions
• Collection of SQL Queries to recreate the database
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
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.
– 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 © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Physical Backup (MEB)
• Advantages
– “HOT” NON-Blocking for Innodb
– Performance – orders of magnitude faster
for backup and restore
– Scalable – performance is near linear for
larger databases.
– Efficient – processes mostly run outside
server
– More compact backup files – up to 90%
compression in some cases.
– Secure – supports AES 256 compression
• Copy of the internal files that constitute the MySQL database
• Restore Copy back Internal Files and Replay data changes to make data
consistent.
– Flexible – support for incremental backups, partial
backups, backup compression, point in time recovery
and more.
– Many targets supported directly
– Media Managers – Oracle Secure Backup,
– Cloud Storage - AWS S3, OpenStack Swift
– General Streaming (pipe to SSH etc)
– Archival Backups – suitable archival format for
historical purposes
– Consistent – delivers consistent point in time recovery
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Backup Options Comparison/Summary
MySQL Enterprise Backup mysqlpump mysqldump LVM Snapshot MySQL HA GR/Replication
Full Backup Y Y Y Y Y
Incremental Backup Y N N Y N
Partial Backup Y Y Y N N
Compression Support Y N N N N
Encryption Support Y N N N N
Allows Updates Y N N N Y
Point in time consistent Y N N Y Y
Backup Speed Very Fast Slow Very Slow Fast Very Fast
Recovery Speed Very Fast Very Poor Very Poor Fast Very Fast
Partial Restore Y Y Y N N
Corruption Detection Y Y Y N N
Meet Regulatory Archive
Requirements
Y Y Y N N
Supports DDL Y Y Y N N
Streaming Support Y Y Y N N
Direct Media Manager/Tape
Support
Y N N N N
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Backup and Recovery can be trickier than it appears
Requires some fore thought and planning
• How do you backup your critical production systems?
• While servers are performing critical business functions
• And downtime is not acceptable
• Where negative performance impacts are not acceptable
• Finding proper backup storage space is critical
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Example Backup Strategy
A comprehensive plan for backup and recovery
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
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 © 2015, Oracle and/or its affiliates. All rights reserved. |
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 © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
To consider performance think of structure of a running backup –
one way is like this.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
To consider performance think of structure of a running backup – or
like this.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
To consider performance think of structure of a running backup – or
like this.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
What determines backup speed? The longest time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
What determines backup speed? The longest time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
What determines backup speed? The longest time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
What determines backup speed? The longest Time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Too much Sharing – slows things down –
Mostly IO Contention, At times CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Improving backup speed
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Does Highest Compression=Higher Speed
Not typically
High
Compression
Impacts on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
MySQL Enterprise Backup is Truly Parallel
Read, Write, Processing
Parallel Processing
Is Faster
https://blogs.oracle.com/mysqlenterprisebackup/entry/truly_parallel_backup_mysql_enterprise
http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-capacity-options.html
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
MySQL Enterprise Backup is Buffered
http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-capacity-options.html
http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-performance.html
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Understanding your system
• CPU load
– Patterns – look at times of day
– Load level – is it low or high – often DBs are low = 30%
• IO load
– Patterns – look at times of day
– Architecture
• IO rate
– How fast can you read database files?
– How fast can you write?
– Run DD or other tools – whats you MB/sec?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Compression options
• LZ4
– Fastest and Most Efficient
– Slightly Lower compression rate
• ZLIB
– Medium Compression
– Medium Cost
• LZMA
– High Compression rate
• Huge Dictionary
– High cost
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
LZ4 –default compression (older versions were zlib)
• IF
– To save on write IO on backup
– For backup to run faster/in less time
• Most cases faster than uncompressed
• If write bound – less data to write is faster
– And makes CPU overhead even lower
– On a busy database
• LZ4 is low overhead – database CPUs not saturated.
– Lz4 compression doesn’t side affect DB performance
• If zlib compression was to much CPU overhead
– Try LZ4 - better than LZO/QuickLZ and many others
• NOT IF
– Database is already compressed or blob data is compressed
• Can’t compress what is already compressed
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
LZMA – new option for compression at all costs
• IF
– Really want to save on space
– Running off hours or cold backup
– Have strong CPUs
– Have horribly Slow IO
• NOT IF
– You want the backup to run faster
• Typically time is slower
– You have a busy database
• LZMA is high overhead and will saturate CPUs
• If zlib was to much overhead previously, LZMA is more
– Instead try LZ4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Test these new Options
Recommendation
• Use previous guidance BUT
• Trying various options out
– Your results may vary
• Its why we have options
– Pick what works best for you
• Let us know what worked best
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
New Encryption option
Secure your sensitive backup data with encryption
• Note – only supported for image backup
– --backup-image
• Works very well with compression
– Compress then encrypt – you can’t compress encrypted files.
• Uses symmetric Encryption
– AES – Advanced Encryption Standard
• 256 bit
– Using very latest OpenSSL Library
– Data is encrypted prior to hitting disk or other storage
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
WHAT’S NEW,
WHEN TO USE,
HOW TO USE
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Optimistic Backup Overview
• Takes advantage of Database table usage patterns
– Tables that are infrequently updated
– Tables that are typically only update during certain periods of time
• Uses that information to optimize the backup pattern
• Results in
– Faster, Less Time
– Smaller
– Less overhead backups
– Quicker recovery, Less Time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Optimistic Backup Overview – How it work
• You provide information about tables
– Which are active or inactive
– Based on names or timing etc.
• Use this info to perform a 2 phase backup
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Why is optimistic better faster in some cases
• Normally we assume every table could change
– Start collecting the REDO log at start of the backup
• All of it
– Thus if the backup takes 1 hour – we backup 1 hour of REDO changes for all tables
• If we know many tables don’t change then
– We don’t start copying the REDO till we get to active tables
– Its may be that 80% of data isn’t changing
– We copy that 80%
– Then start active 20%. REDO may be ~80% smaller
• On restore REDO brings to a consistent state
– Now has 80% fewer pages to go through and apply
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Phase 1 – copy “inactive” files
Phase 2 – copy “active” files
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Optimistic Parameters
• optimistic-time
– This option specifies the cut-off date-time to identify tables to be skipped in first
phase. Several options - easiest is {Number}{Unit} – for example --optimistic-
time=23hours
– https://dev.mysql.com/doc/mysql-enterprise-backup/4.0/en/backup-capacity-options.html#option_meb_optimistic-time
• optimistic-busy-tables
– This option specifies the InnoDB tables (i.e. busy tables) to be skipped in the first
phase.
– Defined using a regular expression
• Note: optimistic-busy-tables gets higher precedence than the optimistic-
time option
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Optimistic Differential Backup
• We already have FULL optimistic
– now Incremental completes the feature - even greater value
• Without incremental optimistic
– Current algorithm checks all tables to find changed pages
• With optimistic (more efficient)
– Scans only those tables that have been modified since the previous backup
– In case of optimistic incremental backup, no additional parameters are necessary
• No need for --optimistic-time or --optimistic-busy-tables options
– Busy tables are already clearly defined and identified
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
How’s it optimistic incremental works
• Optimistic incremental backup starts
• Compares the modified time of each table against the consistency time.
• If the modification time of a table is greater than the consistency time
– Table has been modified after consistency time was recorded
• Optimistic incremental backup copies changed pages
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Example of Optimistic Backups – FULL and Incremental
FULL – this uses a datetime format – could also use hours, days, weeks, etc. since change format
# A full optimistic backup performed on 2017/02/04, Sat, at 1130 PM.
mysqlbackup --defaults-file=/home/admin/my.cnf 
--optimistic-time=110516200000 
--backup-dir=/home/admin/temp_dir
--backup-image=/home/admin/bkups/mydb_full_201702042330.bi 
--with-timestamp 
backup-to-image
# A sequence of optimistic incremental backups are then performed on each the following six days at 1130 PM # On Sunday, 2017/02/05
mysqlbackup --defaults-file=/home/admin/my.cnf 
--incremental=optimistic --incremental-base=history:last_backup 
--backup-dir=/home/admin/temp_dir 
--backup-image=/home/admin/bkups/mydb_incremental__201702052330.bi 
--with-timestamp 
backup-to-image
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Example of Optimistic Restore – FULL and Incremental
# Restore the database to its state at Tuesday, 2017/02/07, at 11:30 PM
# First, restore the full optimistic backup taken on the Saturday before, which was 2017/02/04:
mysqlbackup --defaults-file=/etc/my.cnf
--backup-image=/home/admin/backups/mydb_full_201702042330.bi 
--backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql 
--with-timestamp 
copy-back-and-apply-log
# Next, restore the optimistic incremental taken on the Sunday, Monday, and Tuesday that follow:
mysqlbackup --defaults-file=/etc/my.cnf --backup-image=/home/admin/backups/mydb_incremental__201702052330.bi 
--incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental 
--with-timestamp 
copy-back-and-apply-log
mysqlbackup --defaults-file=/etc/my.cnf
--backup-image=/home/admin/backups/mydb_incremental__201702062330.bi 
--incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental 
--with-timestamp 
copy-back-and-apply-log
mysqlbackup --defaults-file=/etc/my.cnf
--backup-image=/home/admin/backups/mydb_incremental__201702072330.bi 
--incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental 
--with-timestamp 
copy-back-and-apply-log
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Improved Redo Log Copying
• Fixes issue with Redo Log overwrites
• If redo log records were written faster than they can be processed by
MEB, the backup operation fails
– Log scan was only able to reach <LSN1>, but a checkpoint was at <LSN2>.
– Means that the database server has overwritten a part of the circular REDO log files
before the backup was able to read it.
– To solve this problem either:
• Re-run the backup when the database has less load, or
• Re-configure the database with bigger InnoDB log files.
• Improved – now this problem is highly unlikely
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Improved Redo Log Copying
• Prior to 4.1
The redo log thread does a lot of work for a single thread
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Improved Redo Log Copying
• New in 4.1
Now REDO processing split into multiple threads
Could replicate the redo log overwrite issues easily with the older version, but we are yet to see the
problem in the 4.1 release.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
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/4.1/en/index.html
• How Do I get it
– https://edelivery.oracle.com
• Support and patches (My Oracle Support = MOS)
– https://support.oracle.com
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
‹#›
Thanks for Attending
• You’ll get the slides
• Please don’t hesitate to send us ideas, feedback, doc requests, blog
requests, etc.
– http://bugs.mysql.com/report.php
– Directly through support
– Blog Comments
– Email
• gagan.goel@oracle.com

More Related Content

What's hot

EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
EDB
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16
Comsysto Reply GmbH
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
Kellyn Pot'Vin-Gorman
 
Resource Management in Impala - StampedeCon 2016
Resource Management in Impala - StampedeCon 2016Resource Management in Impala - StampedeCon 2016
Resource Management in Impala - StampedeCon 2016
StampedeCon
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem Session
Michael Marth
 
Farming hadoop in_the_cloud
Farming hadoop in_the_cloudFarming hadoop in_the_cloud
Farming hadoop in_the_cloud
Steve Loughran
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best Practices
EDB
 
Impala Resource Management - OUTDATED
Impala Resource Management - OUTDATEDImpala Resource Management - OUTDATED
Impala Resource Management - OUTDATED
Matthew Jacobs
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
Jason Ragsdale
 
Power Saturday 2019 B6 - SQL Server installation cookbook
Power Saturday 2019 B6 - SQL Server installation cookbookPower Saturday 2019 B6 - SQL Server installation cookbook
Power Saturday 2019 B6 - SQL Server installation cookbook
PowerSaturdayParis
 
The new repository in AEM 6
The new repository in AEM 6The new repository in AEM 6
The new repository in AEM 6
Jukka Zitting
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
Tobias Koprowski
 
SQL Azure for ITPros
SQL Azure for ITProsSQL Azure for ITPros
SQL Azure for ITPros
Tobias Koprowski
 
The have no fear guide to virtualizing databases
The have no fear guide to virtualizing databasesThe have no fear guide to virtualizing databases
The have no fear guide to virtualizing databases
SolarWinds
 
Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Servers
heraflux
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
Tobias Koprowski
 
Aerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data DemystifiedAerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data Demystified
Omid Vahdaty
 
Webinar: Operational Best Practices
Webinar: Operational Best PracticesWebinar: Operational Best Practices
Webinar: Operational Best Practices
MongoDB
 
From distributed caches to in-memory data grids
From distributed caches to in-memory data gridsFrom distributed caches to in-memory data grids
From distributed caches to in-memory data grids
Max Alexejev
 
5 Ways to Avoid Server and Application Downtime
5 Ways to Avoid Server and Application Downtime5 Ways to Avoid Server and Application Downtime
5 Ways to Avoid Server and Application Downtime
Neverfail Group
 

What's hot (20)

EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
 
Resource Management in Impala - StampedeCon 2016
Resource Management in Impala - StampedeCon 2016Resource Management in Impala - StampedeCon 2016
Resource Management in Impala - StampedeCon 2016
 
Scaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem SessionScaling AEM (CQ5) Gem Session
Scaling AEM (CQ5) Gem Session
 
Farming hadoop in_the_cloud
Farming hadoop in_the_cloudFarming hadoop in_the_cloud
Farming hadoop in_the_cloud
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best Practices
 
Impala Resource Management - OUTDATED
Impala Resource Management - OUTDATEDImpala Resource Management - OUTDATED
Impala Resource Management - OUTDATED
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Power Saturday 2019 B6 - SQL Server installation cookbook
Power Saturday 2019 B6 - SQL Server installation cookbookPower Saturday 2019 B6 - SQL Server installation cookbook
Power Saturday 2019 B6 - SQL Server installation cookbook
 
The new repository in AEM 6
The new repository in AEM 6The new repository in AEM 6
The new repository in AEM 6
 
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
44spotkaniePLSSUGWRO_CoNowegowKrainieChmur
 
SQL Azure for ITPros
SQL Azure for ITProsSQL Azure for ITPros
SQL Azure for ITPros
 
The have no fear guide to virtualizing databases
The have no fear guide to virtualizing databasesThe have no fear guide to virtualizing databases
The have no fear guide to virtualizing databases
 
Scaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL ServersScaling Up and Out your Virtualized SQL Servers
Scaling Up and Out your Virtualized SQL Servers
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
 
Aerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data DemystifiedAerospike meetup july 2019 | Big Data Demystified
Aerospike meetup july 2019 | Big Data Demystified
 
Webinar: Operational Best Practices
Webinar: Operational Best PracticesWebinar: Operational Best Practices
Webinar: Operational Best Practices
 
From distributed caches to in-memory data grids
From distributed caches to in-memory data gridsFrom distributed caches to in-memory data grids
From distributed caches to in-memory data grids
 
5 Ways to Avoid Server and Application Downtime
5 Ways to Avoid Server and Application Downtime5 Ways to Avoid Server and Application Downtime
5 Ways to Avoid Server and Application Downtime
 

Similar to MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!

MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016
Ted Wennmark
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
Mark Swarbrick
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
MarketingArrowECS_CZ
 
BGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQLBGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQL
Georgi Kodinov
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Appliance
omnidba
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning
OracleMySQL
 
Using Snap Clone with Enterprise Manager 12c
Using Snap Clone with Enterprise Manager 12cUsing Snap Clone with Enterprise Manager 12c
Using Snap Clone with Enterprise Manager 12c
Pete Sharman
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL database
Dave Stokes
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
Ivan Ma
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
Sanjay Manwani
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
Matt Lord
 
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
 Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
avanttic Consultoría Tecnológica
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
Olivier DASINI
 
Backing Up the MySQL Database
Backing Up the MySQL DatabaseBacking Up the MySQL Database
Backing Up the MySQL Database
Sanjay Manwani
 
Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
OUGTH Oracle User Group in Thailand
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
OracleMySQL
 
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Alfredo Krieg
 
Oracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven ScalabilityOracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven Scalability
Markus Michalewicz
 
5 here today still here tomorrow new technology for big_forever_archives
5 here today still here tomorrow new technology for big_forever_archives5 here today still here tomorrow new technology for big_forever_archives
5 here today still here tomorrow new technology for big_forever_archives
Dr. Wilfred Lin (Ph.D.)
 
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RACAUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
Sandesh Rao
 

Similar to MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!! (20)

MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016MySQL Enterprise Backup apr 2016
MySQL Enterprise Backup apr 2016
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
 
BGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQLBGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQL
 
The Sun ZFS Backup Appliance
The Sun ZFS Backup ApplianceThe Sun ZFS Backup Appliance
The Sun ZFS Backup Appliance
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning
 
Using Snap Clone with Enterprise Manager 12c
Using Snap Clone with Enterprise Manager 12cUsing Snap Clone with Enterprise Manager 12c
Using Snap Clone with Enterprise Manager 12c
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL database
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
 Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
Meetup Oracle Database MAD_BCN: 1.1 Servicios de Oracle Database en la nube
 
MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)MySQL 5.7 InnoDB Cluster (Jan 2018)
MySQL 5.7 InnoDB Cluster (Jan 2018)
 
Backing Up the MySQL Database
Backing Up the MySQL DatabaseBacking Up the MySQL Database
Backing Up the MySQL Database
 
Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
 
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
MySQL in oracle_environments(Part 2): MySQL Enterprise Monitor & Oracle Enter...
 
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
 
Oracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven ScalabilityOracle RAC - Customer Proven Scalability
Oracle RAC - Customer Proven Scalability
 
5 here today still here tomorrow new technology for big_forever_archives
5 here today still here tomorrow new technology for big_forever_archives5 here today still here tomorrow new technology for big_forever_archives
5 here today still here tomorrow new technology for big_forever_archives
 
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RACAUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
AUSOUG - NZOUG-GroundBreakers-Jun 2019 - 19c RAC
 

Recently uploaded

Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 

Recently uploaded (20)

Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 

MySQL Enterprise Backup: Better Very Large Database Backup & Recovery and More!!

  • 1. <Insert Picture Here> MySQL Enterprise Backup Better Very Large Database Backup & Recovery and More! Gagan Goel MEB Software development manager
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Why backups? • Data is your most valuable IP. You have to protect it from loss. • Disaster Recovery – Hardware, Software, Developer or DBA (Pilot) error • Migration and Upgrades - Change Hardware – serve or storage • Create replica’s for HA setup • Archival – requirements to keep data for X number of years • Move chunks of data • Setup Test environments
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Types of Backup and Tools for these types • Logical – Mysqldump – Mysqlpump • Next Generation for logical backup • Physical – MySQL Enterprise Backup (MEB) • Other – Snapshots – Replicas
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› 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. – Portable – use across various OS and MySQL versions • Collection of SQL Queries to recreate the database
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› 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. – No incremental backup – all backups are full backups, can be time consuming and require more storage. • Collection of SQL Queries to recreate the database
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Physical Backup (MEB) • Advantages – “HOT” NON-Blocking for Innodb – Performance – orders of magnitude faster for backup and restore – Scalable – performance is near linear for larger databases. – Efficient – processes mostly run outside server – More compact backup files – up to 90% compression in some cases. – Secure – supports AES 256 compression • Copy of the internal files that constitute the MySQL database • Restore Copy back Internal Files and Replay data changes to make data consistent. – Flexible – support for incremental backups, partial backups, backup compression, point in time recovery and more. – Many targets supported directly – Media Managers – Oracle Secure Backup, – Cloud Storage - AWS S3, OpenStack Swift – General Streaming (pipe to SSH etc) – Archival Backups – suitable archival format for historical purposes – Consistent – delivers consistent point in time recovery
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Backup Options Comparison/Summary MySQL Enterprise Backup mysqlpump mysqldump LVM Snapshot MySQL HA GR/Replication Full Backup Y Y Y Y Y Incremental Backup Y N N Y N Partial Backup Y Y Y N N Compression Support Y N N N N Encryption Support Y N N N N Allows Updates Y N N N Y Point in time consistent Y N N Y Y Backup Speed Very Fast Slow Very Slow Fast Very Fast Recovery Speed Very Fast Very Poor Very Poor Fast Very Fast Partial Restore Y Y Y N N Corruption Detection Y Y Y N N Meet Regulatory Archive Requirements Y Y Y N N Supports DDL Y Y Y N N Streaming Support Y Y Y N N Direct Media Manager/Tape Support Y N N N N
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Backup and Recovery can be trickier than it appears Requires some fore thought and planning • How do you backup your critical production systems? • While servers are performing critical business functions • And downtime is not acceptable • Where negative performance impacts are not acceptable • Finding proper backup storage space is critical
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Example Backup Strategy A comprehensive plan for backup and recovery
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 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
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 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
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› To consider performance think of structure of a running backup – one way is like this.
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› To consider performance think of structure of a running backup – or like this.
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› To consider performance think of structure of a running backup – or like this.
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› What determines backup speed? The longest time
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› What determines backup speed? The longest time
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› What determines backup speed? The longest time
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› What determines backup speed? The longest Time
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Too much Sharing – slows things down – Mostly IO Contention, At times CPU
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Improving backup speed
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Does Highest Compression=Higher Speed Not typically High Compression Impacts on CPU
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› MySQL Enterprise Backup is Truly Parallel Read, Write, Processing Parallel Processing Is Faster https://blogs.oracle.com/mysqlenterprisebackup/entry/truly_parallel_backup_mysql_enterprise http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-capacity-options.html
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› MySQL Enterprise Backup is Buffered http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-capacity-options.html http://dev.mysql.com/doc/mysql-enterprise-backup/4.10/en/backup-performance.html
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Understanding your system • CPU load – Patterns – look at times of day – Load level – is it low or high – often DBs are low = 30% • IO load – Patterns – look at times of day – Architecture • IO rate – How fast can you read database files? – How fast can you write? – Run DD or other tools – whats you MB/sec?
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Compression options • LZ4 – Fastest and Most Efficient – Slightly Lower compression rate • ZLIB – Medium Compression – Medium Cost • LZMA – High Compression rate • Huge Dictionary – High cost
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› LZ4 –default compression (older versions were zlib) • IF – To save on write IO on backup – For backup to run faster/in less time • Most cases faster than uncompressed • If write bound – less data to write is faster – And makes CPU overhead even lower – On a busy database • LZ4 is low overhead – database CPUs not saturated. – Lz4 compression doesn’t side affect DB performance • If zlib compression was to much CPU overhead – Try LZ4 - better than LZO/QuickLZ and many others • NOT IF – Database is already compressed or blob data is compressed • Can’t compress what is already compressed
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› LZMA – new option for compression at all costs • IF – Really want to save on space – Running off hours or cold backup – Have strong CPUs – Have horribly Slow IO • NOT IF – You want the backup to run faster • Typically time is slower – You have a busy database • LZMA is high overhead and will saturate CPUs • If zlib was to much overhead previously, LZMA is more – Instead try LZ4
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Test these new Options Recommendation • Use previous guidance BUT • Trying various options out – Your results may vary • Its why we have options – Pick what works best for you • Let us know what worked best
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› New Encryption option Secure your sensitive backup data with encryption • Note – only supported for image backup – --backup-image • Works very well with compression – Compress then encrypt – you can’t compress encrypted files. • Uses symmetric Encryption – AES – Advanced Encryption Standard • 256 bit – Using very latest OpenSSL Library – Data is encrypted prior to hitting disk or other storage
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› WHAT’S NEW, WHEN TO USE, HOW TO USE
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Optimistic Backup Overview • Takes advantage of Database table usage patterns – Tables that are infrequently updated – Tables that are typically only update during certain periods of time • Uses that information to optimize the backup pattern • Results in – Faster, Less Time – Smaller – Less overhead backups – Quicker recovery, Less Time
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Optimistic Backup Overview – How it work • You provide information about tables – Which are active or inactive – Based on names or timing etc. • Use this info to perform a 2 phase backup
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Why is optimistic better faster in some cases • Normally we assume every table could change – Start collecting the REDO log at start of the backup • All of it – Thus if the backup takes 1 hour – we backup 1 hour of REDO changes for all tables • If we know many tables don’t change then – We don’t start copying the REDO till we get to active tables – Its may be that 80% of data isn’t changing – We copy that 80% – Then start active 20%. REDO may be ~80% smaller • On restore REDO brings to a consistent state – Now has 80% fewer pages to go through and apply
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Phase 1 – copy “inactive” files Phase 2 – copy “active” files
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Optimistic Parameters • optimistic-time – This option specifies the cut-off date-time to identify tables to be skipped in first phase. Several options - easiest is {Number}{Unit} – for example --optimistic- time=23hours – https://dev.mysql.com/doc/mysql-enterprise-backup/4.0/en/backup-capacity-options.html#option_meb_optimistic-time • optimistic-busy-tables – This option specifies the InnoDB tables (i.e. busy tables) to be skipped in the first phase. – Defined using a regular expression • Note: optimistic-busy-tables gets higher precedence than the optimistic- time option
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Optimistic Differential Backup • We already have FULL optimistic – now Incremental completes the feature - even greater value • Without incremental optimistic – Current algorithm checks all tables to find changed pages • With optimistic (more efficient) – Scans only those tables that have been modified since the previous backup – In case of optimistic incremental backup, no additional parameters are necessary • No need for --optimistic-time or --optimistic-busy-tables options – Busy tables are already clearly defined and identified
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› How’s it optimistic incremental works • Optimistic incremental backup starts • Compares the modified time of each table against the consistency time. • If the modification time of a table is greater than the consistency time – Table has been modified after consistency time was recorded • Optimistic incremental backup copies changed pages
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Example of Optimistic Backups – FULL and Incremental FULL – this uses a datetime format – could also use hours, days, weeks, etc. since change format # A full optimistic backup performed on 2017/02/04, Sat, at 1130 PM. mysqlbackup --defaults-file=/home/admin/my.cnf --optimistic-time=110516200000 --backup-dir=/home/admin/temp_dir --backup-image=/home/admin/bkups/mydb_full_201702042330.bi --with-timestamp backup-to-image # A sequence of optimistic incremental backups are then performed on each the following six days at 1130 PM # On Sunday, 2017/02/05 mysqlbackup --defaults-file=/home/admin/my.cnf --incremental=optimistic --incremental-base=history:last_backup --backup-dir=/home/admin/temp_dir --backup-image=/home/admin/bkups/mydb_incremental__201702052330.bi --with-timestamp backup-to-image
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Example of Optimistic Restore – FULL and Incremental # Restore the database to its state at Tuesday, 2017/02/07, at 11:30 PM # First, restore the full optimistic backup taken on the Saturday before, which was 2017/02/04: mysqlbackup --defaults-file=/etc/my.cnf --backup-image=/home/admin/backups/mydb_full_201702042330.bi --backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --with-timestamp copy-back-and-apply-log # Next, restore the optimistic incremental taken on the Sunday, Monday, and Tuesday that follow: mysqlbackup --defaults-file=/etc/my.cnf --backup-image=/home/admin/backups/mydb_incremental__201702052330.bi --incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental --with-timestamp copy-back-and-apply-log mysqlbackup --defaults-file=/etc/my.cnf --backup-image=/home/admin/backups/mydb_incremental__201702062330.bi --incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental --with-timestamp copy-back-and-apply-log mysqlbackup --defaults-file=/etc/my.cnf --backup-image=/home/admin/backups/mydb_incremental__201702072330.bi --incremental-backup-dir=/home/admin/temp_dir --datadir=/var/lib/mysql --incremental --with-timestamp copy-back-and-apply-log
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Improved Redo Log Copying • Fixes issue with Redo Log overwrites • If redo log records were written faster than they can be processed by MEB, the backup operation fails – Log scan was only able to reach <LSN1>, but a checkpoint was at <LSN2>. – Means that the database server has overwritten a part of the circular REDO log files before the backup was able to read it. – To solve this problem either: • Re-run the backup when the database has less load, or • Re-configure the database with bigger InnoDB log files. • Improved – now this problem is highly unlikely
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Improved Redo Log Copying • Prior to 4.1 The redo log thread does a lot of work for a single thread
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Improved Redo Log Copying • New in 4.1 Now REDO processing split into multiple threads Could replicate the redo log overwrite issues easily with the older version, but we are yet to see the problem in the 4.1 release.
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› 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/4.1/en/index.html • How Do I get it – https://edelivery.oracle.com • Support and patches (My Oracle Support = MOS) – https://support.oracle.com
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. ‹#› Thanks for Attending • You’ll get the slides • Please don’t hesitate to send us ideas, feedback, doc requests, blog requests, etc. – http://bugs.mysql.com/report.php – Directly through support – Blog Comments – Email • gagan.goel@oracle.com