SlideShare a Scribd company logo
MySQL Backup Best Practices
and Case Study: .IE
Continuous Restore Process
Marcelo Altmann
Senior Support Engineer - Percona
Mick Begley
Technical Service Manager - IE
Domain Registry
Agenda
3
Agenda
• Why we need backups for ?
• Types of backups
• Encryption
• Compression
• Where to store ?
• Restoration
• Validation
• Binlogs
• Retention period
Who is speaking ?
5
Who is Speaking ?
• Marcelo Altmann
- Senior Support Engineer @ Percona
• MySQL DBA @ IE Domain Registry
- Certifications
• Oracle Certified Professional, MySQL 5.6 Database Administrator
• Oracle Certified Professional, MySQL 5.6 Developer
• Oracle Certified Professional, MySQL 5 Database Administrator
• Oracle Certified Professional, MySQL 5 Developer
• Oracle Certified Associate, MySQL 5.0/5.1/5.5
- Oracle ACE Associate
- blog.marceloaltmann.com
- @altmannmarcelo
6
Who is Speaking ?
• Mick Begley
- Technical Services Manager @ IE Domain Registry CLG
• Head of IT @ First Derivatives
• Service Integration Manager @ HP
- Certifications
• IT and Psychology
• Qualified ITIL Service Manager
• PMI Certified Project Manager
Why we need backups for ?
8
Why we need backups for ?
• Slave provisioning
• Build Staging / Dev environments
• Disaster recovery
- Data Corruption
- Malicious SQL
- Software Bugs
- Hardware failure
9
Replication as backup ? Yes
• Master crashes
• Database physical file corruption
• Any physical hardware failure
- CPU
- RAM
- Disk
- Network card
10
Replication as backup ? No
• Application Bug
• Database Hack
• Malicious SQL commands
Types of backups
12
Types of backups - Logical
• Structure and data are saved as logical structure
• CREATE DATABASE / TABLE
• INSERT INTO
• Can easily be used for selective restore (Only one database/table)
• Good when physical file is fragmented / corrupted
• Taken while MySQL is running
• Slower than physical
• Tools: mysqldump, mydumper, mysqlpump
13
Types of backups - Physical
• Raw copy of your databases and tables
• Can be used for selective restore (Only one database/table)
• Fast for either Dump and restore
• Can be taken while MySQL is running
• Bad for table corruption
• Tools: Percona XtraBackup, MySQL Enterprise Backup, snapshots, rsync, cp
14
Types of backups - Differential or Incremental
• Differential
- Full copy of the database
- Each differential backup has all the changes since last full backup
• Monday: FULL
• Tuesday: Incremental since Monday
• Wednesday: Incremental since Monday
• Thursday: Incremental since Monday
15
Types of backups - Differential or Incremental
• Incremental
- Full copy of the database
- Each incremental backup has all the changes since last backup
• Monday: FULL
• Tuesday: Incremental since Monday
• Wednesday: Incremental since Tuesday
• Thursday: Incremental since Wednesday
Am I done ?
N O ! ! !
Encryption
19
Encryption
• Keep your backups safe from unwanted access
• openssl
• Percona XtraBackup
• --encrypt=ALGORITHM
- AES128, AES192, AES256
• --encrypt-key=ENCRYPTION_KEY or --encrypt-key-file=KEYFILE
20
Encryption
• Encrypt
- xtrabackup --backup --encrypt=AES256 
--encrypt-key-file=/data/backups/keyfile --target-dir=/data/backups
• --encrypt-threads (used with --parallel )
• Decrypt
- xtrabackup --decrypt=AES256 
--encrypt-key-file=/data/backups/keyfile --target-dir=/data/backups
Compression
22
Compression
• Save storage space
• Require less network when streaming
• Percona XtraBackup
-xtrabackup --backup --compress 
--parallel=4 --compress-threads=4 --target-dir=/data/compressed/
•zip / gzip / bzip
Where to store ?
24
Where to store ?
• Where are you going to store your backups ?
25
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
26
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
27
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
- Same Data-Center?
28
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
- Same Data-Center?
29
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
- Same Data-Center?
- Same Region ?
30
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
- Same Data-Center?
- Same Region ?
31
Where to store ?
• Where are you going to store your backups ?
- Same Server ?
- Same Data-Center?
- Same Region ?
•What type of disaster my data must survive ?
Attention ! ! !
R E S T O R E ! ! !
34
R E S T O R E ! ! !
•Most important thing when taking backups
•If you don’t test your backup, you simple don’t have a backup.
•Restore on a fresh server
•Keep track of restoration times
•Re-configure as a slave
•Test PITR
Validate your data
36
Validate your data
•Run checksum on your data
•Ensures your backup has all the data and the data is consistent
•Pt-table-checksum / mysqldbcompare
Backup your binlogs
38
Backup your binlogs
•Store a safe copy of your binlogs
•Allows you to do point-in-time recovery even if you lose your master
•Mysqlbinlog
- mysqlbinlog --read-from-remote-server --host=host_name --raw --stop-never binlog_file
•MaxScale Binlog Server
Retention period / audits
40
Retention period / audits
•How far back in time you may need your data ?
•How are you going to store it?
•Be prepared to restore
.ie Backup
Mick Begley IE Domain Registry
mbegley@iedr.ie
Agenda
• Who are we?
• How is our backup setup?
• Schedule
• Restore times
• Questions
Who are the IEDR ?
● The IEDR is the registry for .ie Internet Domain names and maintains
the database of .ie registered Internet names.
● Managing since 2000
● Team of 20
● Console, API application across Three Datacenters
● 2016 stats (219,858 total registrations, 34,615 new reg, 89% renewal rate)
● Today 231,826 Domains
44
What is DNS?
● Domain Name Servers (DNS) are the Internet's equivalent of a phone
book. They maintain a directory of domain names and translate them to
Internet Protocol (IP) addresses.
● Makes it easier to move around the Internet (dont have to remember IP
addresses)
● Database of high importance
● Database pushes out zone file across the world
● Over 70 nodes
● Local slave and DR site backup slave
● Stop replication to slave
● Dump slave
● Restart replication
● Verify Dump, Compress Dump, Encrypt Dump
● Send to Backup Server
How is our backup setup?
● Reset DR site backup slave
● Drop all DBs
● Decrypt Dump from backup, unCompress, Restore Dump
● Stop Server
● Compress DataDirectory , Encrypt DataDirectory
● Send to Backup Server
How is our backup setup?
MySQL Backup Best Practices and Case Study- .ie Continuous Restore Process
Backup Schedule
● Backups run at times outside of zone pushes
● Backups run at times outside of system batch processing (NRP,
Invoicing)
Restore procedure
50
Thank You Sponsors!
51
SAVE THE DATE!
CALL FOR PAPERS OPENING SOON!
www.perconalive.com
April 23-25, 2018
Santa Clara Convention Center
Questions ?
Marcelo Altmann
@altmannmarcelo
Mick Begley
@mickarooney
Ad

Recommended

Percona Xtrabackup Best Practices
Percona Xtrabackup Best Practices
Marcelo Altmann
 
ProxySQL para mysql
ProxySQL para mysql
Marcelo Altmann
 
Designing enterprise drupal
Designing enterprise drupal
Jason Burnett
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
René Cannaò
 
MySQL Tuning
MySQL Tuning
Ford AntiTrust
 
Modern MySQL Monitoring and Dashboards.
Modern MySQL Monitoring and Dashboards.
Mydbops
 
High performance and high availability proxies for MySQL
High performance and high availability proxies for MySQL
Mydbops
 
Enterprise Drupal Application & Hosting Infrastructure Level Monitoring
Enterprise Drupal Application & Hosting Infrastructure Level Monitoring
Daniel Kanchev
 
Ansible MySQL MHA
Ansible MySQL MHA
Alkin Tezuysal
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1
Ivan Zoratti
 
Managing MySQL with Ansible
Managing MySQL with Ansible
Ben Mildren
 
Galera cluster for high availability
Galera cluster for high availability
Mydbops
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changes
Morgan Tocker
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient Backups
Mydbops
 
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
M Malai
 
Performance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
MySQL Performance Tuning Variables
MySQL Performance Tuning Variables
FromDual GmbH
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
Severalnines
 
Drupal In The Cloud
Drupal In The Cloud
Jochen Lillich
 
Myrocks in the wild wild west! FOSDEM 2020
Myrocks in the wild wild west! FOSDEM 2020
Alkin Tezuysal
 
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
Mydbops
 
MyDUMPER : Faster logical backups and restores
MyDUMPER : Faster logical backups and restores
Mydbops
 
Lock, Stock and Backup: Data Guaranteed
Lock, Stock and Backup: Data Guaranteed
Jervin Real
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
Lenz Grimmer
 

More Related Content

What's hot (20)

Ansible MySQL MHA
Ansible MySQL MHA
Alkin Tezuysal
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1
Ivan Zoratti
 
Managing MySQL with Ansible
Managing MySQL with Ansible
Ben Mildren
 
Galera cluster for high availability
Galera cluster for high availability
Mydbops
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changes
Morgan Tocker
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient Backups
Mydbops
 
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
M Malai
 
Performance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
MySQL Performance Tuning Variables
MySQL Performance Tuning Variables
FromDual GmbH
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
Severalnines
 
Drupal In The Cloud
Drupal In The Cloud
Jochen Lillich
 
Myrocks in the wild wild west! FOSDEM 2020
Myrocks in the wild wild west! FOSDEM 2020
Alkin Tezuysal
 
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
Mydbops
 
MyDUMPER : Faster logical backups and restores
MyDUMPER : Faster logical backups and restores
Mydbops
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1
Ivan Zoratti
 
Managing MySQL with Ansible
Managing MySQL with Ansible
Ben Mildren
 
Galera cluster for high availability
Galera cluster for high availability
Mydbops
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
Tarique Saleem
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changes
Morgan Tocker
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient Backups
Mydbops
 
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
Ansible is Our Wishbone(Automate DBA Tasks With Ansible)
M Malai
 
Performance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
MySQL Performance Tuning Variables
MySQL Performance Tuning Variables
FromDual GmbH
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
Severalnines
 
Myrocks in the wild wild west! FOSDEM 2020
Myrocks in the wild wild west! FOSDEM 2020
Alkin Tezuysal
 
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
Mydbops
 
MyDUMPER : Faster logical backups and restores
MyDUMPER : Faster logical backups and restores
Mydbops
 

Similar to MySQL Backup Best Practices and Case Study- .ie Continuous Restore Process (20)

Lock, Stock and Backup: Data Guaranteed
Lock, Stock and Backup: Data Guaranteed
Jervin Real
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
Lenz Grimmer
 
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Marcelo Altmann
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
Colin Charles
 
MySQL and MariaDB Backups
MySQL and MariaDB Backups
Federico Razzoli
 
A Backup Today Saves Tomorrow
A Backup Today Saves Tomorrow
Andrew Moore
 
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Severalnines
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
Keith Hollman
 
Making Backups in Extreme Situations
Making Backups in Extreme Situations
Sveta Smirnova
 
My two cents about Mysql backup
My two cents about Mysql backup
Andrejs Vorobjovs
 
MySQL enterprise backup overview
MySQL enterprise backup overview
郁萍 王
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Severalnines
 
Pdb my sql backup london percona live 2012
Pdb my sql backup london percona live 2012
Pythian
 
MySQL Enterprise Backup
MySQL Enterprise Backup
Mario Beck
 
Highly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackup
Nilnandan Joshi
 
Scalabe MySQL Infrastructure
Scalabe MySQL Infrastructure
Balazs Pocze
 
MySQL for Oracle DBAs
MySQL for Oracle DBAs
Mark Leith
 
MySQL Backup & Recovery
MySQL Backup & Recovery
Mindfire Solutions
 
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zarafa
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
Severalnines
 
Lock, Stock and Backup: Data Guaranteed
Lock, Stock and Backup: Data Guaranteed
Jervin Real
 
MySQL Server Backup, Restoration, and Disaster Recovery Planning
MySQL Server Backup, Restoration, and Disaster Recovery Planning
Lenz Grimmer
 
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Percona Live London 2014 - MySQL Backup Strategy @ IEDR
Marcelo Altmann
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
Colin Charles
 
A Backup Today Saves Tomorrow
A Backup Today Saves Tomorrow
Andrew Moore
 
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Become a MySQL DBA - slides: Deciding on a relevant backup solution
Severalnines
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
Keith Hollman
 
Making Backups in Extreme Situations
Making Backups in Extreme Situations
Sveta Smirnova
 
My two cents about Mysql backup
My two cents about Mysql backup
Andrejs Vorobjovs
 
MySQL enterprise backup overview
MySQL enterprise backup overview
郁萍 王
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Severalnines
 
Pdb my sql backup london percona live 2012
Pdb my sql backup london percona live 2012
Pythian
 
MySQL Enterprise Backup
MySQL Enterprise Backup
Mario Beck
 
Highly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackup
Nilnandan Joshi
 
Scalabe MySQL Infrastructure
Scalabe MySQL Infrastructure
Balazs Pocze
 
MySQL for Oracle DBAs
MySQL for Oracle DBAs
Mark Leith
 
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zararfa SummerCamp 2012 - Performing fast backups in large scale environments...
Zarafa
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
Severalnines
 
Ad

More from Marcelo Altmann (11)

Backup Online no MySQL com Percona Xtrabackup
Backup Online no MySQL com Percona Xtrabackup
Marcelo Altmann
 
Percona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and Improvements
Marcelo Altmann
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
Marcelo Altmann
 
Backup para MySQL
Backup para MySQL
Marcelo Altmann
 
GDB e Análise de Bugs
GDB e Análise de Bugs
Marcelo Altmann
 
Percona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQL
Marcelo Altmann
 
DB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQL
Marcelo Altmann
 
A Percona Support Engineer Walkthrough on pt-stalk
A Percona Support Engineer Walkthrough on pt-stalk
Marcelo Altmann
 
MysQL melhores práticas de seguranca
MysQL melhores práticas de seguranca
Marcelo Altmann
 
Optimizando MySQL
Optimizando MySQL
Marcelo Altmann
 
MySQL - Melhores práticas de replicação de dados
MySQL - Melhores práticas de replicação de dados
Marcelo Altmann
 
Backup Online no MySQL com Percona Xtrabackup
Backup Online no MySQL com Percona Xtrabackup
Marcelo Altmann
 
Percona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and Improvements
Marcelo Altmann
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
Marcelo Altmann
 
Percona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQL
Marcelo Altmann
 
DB Floripa - ProxySQL para MySQL
DB Floripa - ProxySQL para MySQL
Marcelo Altmann
 
A Percona Support Engineer Walkthrough on pt-stalk
A Percona Support Engineer Walkthrough on pt-stalk
Marcelo Altmann
 
MysQL melhores práticas de seguranca
MysQL melhores práticas de seguranca
Marcelo Altmann
 
MySQL - Melhores práticas de replicação de dados
MySQL - Melhores práticas de replicação de dados
Marcelo Altmann
 
Ad

Recently uploaded (20)

Paper: The World Game (s) Great Redesign.pdf
Paper: The World Game (s) Great Redesign.pdf
Steven McGee
 
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
 
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
 
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
 
Slides: Eco Economic Epochs for The World Game (s) pdf
Slides: Eco Economic Epochs for The World Game (s) pdf
Steven McGee
 
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
Mostofa Kamal Al-Azad
 
Transmission Control Protocol (TCP) and Starlink
Transmission Control Protocol (TCP) and Starlink
APNIC
 
Almos Entirely Correct Mixing with Apps to Voting
Almos Entirely Correct Mixing with Apps to Voting
gapati2964
 
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
 
Global Networking Trends, presented at the India ISP Conclave 2025
Global Networking Trends, presented at the India ISP Conclave 2025
APNIC
 
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
 
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
taqyed
 
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
 
inside the internet - understanding the TCP/IP protocol
inside the internet - understanding the TCP/IP protocol
shainweniton02
 
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
 
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
 
BroadLink Cloud Service introduction.pdf
BroadLink Cloud Service introduction.pdf
DevendraDwivdi1
 
The ARUBA Kind of new Proposal Umum .pptx
The ARUBA Kind of new Proposal Umum .pptx
andiwarneri
 
Clive Dickens RedTech Public Copy - Collaborate or Die
Clive Dickens RedTech Public Copy - Collaborate or Die
Clive Dickens
 
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
taqyea
 
Paper: The World Game (s) Great Redesign.pdf
Paper: The World Game (s) Great Redesign.pdf
Steven McGee
 
history of internet in nepal Class-8 (sparsha).pptx
history of internet in nepal Class-8 (sparsha).pptx
SPARSH508080
 
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
 
Logging and Automated Alerting Webinar.pdf
Logging and Automated Alerting Webinar.pdf
ControlCase
 
Slides: Eco Economic Epochs for The World Game (s) pdf
Slides: Eco Economic Epochs for The World Game (s) pdf
Steven McGee
 
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
B M Mostofa Kamal Al-Azad [Document & Localization Expert]
Mostofa Kamal Al-Azad
 
Transmission Control Protocol (TCP) and Starlink
Transmission Control Protocol (TCP) and Starlink
APNIC
 
Almos Entirely Correct Mixing with Apps to Voting
Almos Entirely Correct Mixing with Apps to Voting
gapati2964
 
Pitch PitchPitchPitchPitchPitchPitch.pptx
Pitch PitchPitchPitchPitchPitchPitch.pptx
157551
 
Global Networking Trends, presented at the India ISP Conclave 2025
Global Networking Trends, presented at the India ISP Conclave 2025
APNIC
 
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
 
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
原版澳洲斯文本科技大学毕业证(SUT毕业证书)如何办理
taqyed
 
BitRecover OST to PST Converter Software
BitRecover OST to PST Converter Software
antoniogosling01
 
inside the internet - understanding the TCP/IP protocol
inside the internet - understanding the TCP/IP protocol
shainweniton02
 
DDoS in India, presented at INNOG 8 by Dave Phelan
DDoS in India, presented at INNOG 8 by Dave Phelan
APNIC
 
Make DDoS expensive for the threat actors
Make DDoS expensive for the threat actors
APNIC
 
BroadLink Cloud Service introduction.pdf
BroadLink Cloud Service introduction.pdf
DevendraDwivdi1
 
The ARUBA Kind of new Proposal Umum .pptx
The ARUBA Kind of new Proposal Umum .pptx
andiwarneri
 
Clive Dickens RedTech Public Copy - Collaborate or Die
Clive Dickens RedTech Public Copy - Collaborate or Die
Clive Dickens
 
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
最新版美国特拉华大学毕业证(UDel毕业证书)原版定制
taqyea
 

MySQL Backup Best Practices and Case Study- .ie Continuous Restore Process

  • 1. MySQL Backup Best Practices and Case Study: .IE Continuous Restore Process Marcelo Altmann Senior Support Engineer - Percona Mick Begley Technical Service Manager - IE Domain Registry
  • 3. 3 Agenda • Why we need backups for ? • Types of backups • Encryption • Compression • Where to store ? • Restoration • Validation • Binlogs • Retention period
  • 5. 5 Who is Speaking ? • Marcelo Altmann - Senior Support Engineer @ Percona • MySQL DBA @ IE Domain Registry - Certifications • Oracle Certified Professional, MySQL 5.6 Database Administrator • Oracle Certified Professional, MySQL 5.6 Developer • Oracle Certified Professional, MySQL 5 Database Administrator • Oracle Certified Professional, MySQL 5 Developer • Oracle Certified Associate, MySQL 5.0/5.1/5.5 - Oracle ACE Associate - blog.marceloaltmann.com - @altmannmarcelo
  • 6. 6 Who is Speaking ? • Mick Begley - Technical Services Manager @ IE Domain Registry CLG • Head of IT @ First Derivatives • Service Integration Manager @ HP - Certifications • IT and Psychology • Qualified ITIL Service Manager • PMI Certified Project Manager
  • 7. Why we need backups for ?
  • 8. 8 Why we need backups for ? • Slave provisioning • Build Staging / Dev environments • Disaster recovery - Data Corruption - Malicious SQL - Software Bugs - Hardware failure
  • 9. 9 Replication as backup ? Yes • Master crashes • Database physical file corruption • Any physical hardware failure - CPU - RAM - Disk - Network card
  • 10. 10 Replication as backup ? No • Application Bug • Database Hack • Malicious SQL commands
  • 12. 12 Types of backups - Logical • Structure and data are saved as logical structure • CREATE DATABASE / TABLE • INSERT INTO • Can easily be used for selective restore (Only one database/table) • Good when physical file is fragmented / corrupted • Taken while MySQL is running • Slower than physical • Tools: mysqldump, mydumper, mysqlpump
  • 13. 13 Types of backups - Physical • Raw copy of your databases and tables • Can be used for selective restore (Only one database/table) • Fast for either Dump and restore • Can be taken while MySQL is running • Bad for table corruption • Tools: Percona XtraBackup, MySQL Enterprise Backup, snapshots, rsync, cp
  • 14. 14 Types of backups - Differential or Incremental • Differential - Full copy of the database - Each differential backup has all the changes since last full backup • Monday: FULL • Tuesday: Incremental since Monday • Wednesday: Incremental since Monday • Thursday: Incremental since Monday
  • 15. 15 Types of backups - Differential or Incremental • Incremental - Full copy of the database - Each incremental backup has all the changes since last backup • Monday: FULL • Tuesday: Incremental since Monday • Wednesday: Incremental since Tuesday • Thursday: Incremental since Wednesday
  • 17. N O ! ! !
  • 19. 19 Encryption • Keep your backups safe from unwanted access • openssl • Percona XtraBackup • --encrypt=ALGORITHM - AES128, AES192, AES256 • --encrypt-key=ENCRYPTION_KEY or --encrypt-key-file=KEYFILE
  • 20. 20 Encryption • Encrypt - xtrabackup --backup --encrypt=AES256 --encrypt-key-file=/data/backups/keyfile --target-dir=/data/backups • --encrypt-threads (used with --parallel ) • Decrypt - xtrabackup --decrypt=AES256 --encrypt-key-file=/data/backups/keyfile --target-dir=/data/backups
  • 22. 22 Compression • Save storage space • Require less network when streaming • Percona XtraBackup -xtrabackup --backup --compress --parallel=4 --compress-threads=4 --target-dir=/data/compressed/ •zip / gzip / bzip
  • 24. 24 Where to store ? • Where are you going to store your backups ?
  • 25. 25 Where to store ? • Where are you going to store your backups ? - Same Server ?
  • 26. 26 Where to store ? • Where are you going to store your backups ? - Same Server ?
  • 27. 27 Where to store ? • Where are you going to store your backups ? - Same Server ? - Same Data-Center?
  • 28. 28 Where to store ? • Where are you going to store your backups ? - Same Server ? - Same Data-Center?
  • 29. 29 Where to store ? • Where are you going to store your backups ? - Same Server ? - Same Data-Center? - Same Region ?
  • 30. 30 Where to store ? • Where are you going to store your backups ? - Same Server ? - Same Data-Center? - Same Region ?
  • 31. 31 Where to store ? • Where are you going to store your backups ? - Same Server ? - Same Data-Center? - Same Region ? •What type of disaster my data must survive ?
  • 33. R E S T O R E ! ! !
  • 34. 34 R E S T O R E ! ! ! •Most important thing when taking backups •If you don’t test your backup, you simple don’t have a backup. •Restore on a fresh server •Keep track of restoration times •Re-configure as a slave •Test PITR
  • 36. 36 Validate your data •Run checksum on your data •Ensures your backup has all the data and the data is consistent •Pt-table-checksum / mysqldbcompare
  • 38. 38 Backup your binlogs •Store a safe copy of your binlogs •Allows you to do point-in-time recovery even if you lose your master •Mysqlbinlog - mysqlbinlog --read-from-remote-server --host=host_name --raw --stop-never binlog_file •MaxScale Binlog Server
  • 40. 40 Retention period / audits •How far back in time you may need your data ? •How are you going to store it? •Be prepared to restore
  • 42. Agenda • Who are we? • How is our backup setup? • Schedule • Restore times • Questions
  • 43. Who are the IEDR ? ● The IEDR is the registry for .ie Internet Domain names and maintains the database of .ie registered Internet names. ● Managing since 2000 ● Team of 20 ● Console, API application across Three Datacenters ● 2016 stats (219,858 total registrations, 34,615 new reg, 89% renewal rate) ● Today 231,826 Domains
  • 44. 44 What is DNS? ● Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. ● Makes it easier to move around the Internet (dont have to remember IP addresses) ● Database of high importance ● Database pushes out zone file across the world ● Over 70 nodes
  • 45. ● Local slave and DR site backup slave ● Stop replication to slave ● Dump slave ● Restart replication ● Verify Dump, Compress Dump, Encrypt Dump ● Send to Backup Server How is our backup setup?
  • 46. ● Reset DR site backup slave ● Drop all DBs ● Decrypt Dump from backup, unCompress, Restore Dump ● Stop Server ● Compress DataDirectory , Encrypt DataDirectory ● Send to Backup Server How is our backup setup?
  • 48. Backup Schedule ● Backups run at times outside of zone pushes ● Backups run at times outside of system batch processing (NRP, Invoicing)
  • 51. 51 SAVE THE DATE! CALL FOR PAPERS OPENING SOON! www.perconalive.com April 23-25, 2018 Santa Clara Convention Center