MySQL Backup Best Practices and Case Study- .ie Continuous Restore Process
This presentation shows the best practices when taking backups. What needs to be taken into consideration. It also demonstrates how IE Domain Registry has structured its backup process.
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
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
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
- 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
- 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
! •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
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
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
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
• Decrypt Dump from backup, unCompress, Restore Dump • Stop Server • Compress DataDirectory , Encrypt DataDirectory • Send to Backup Server How is our backup setup?