Introducing Xtrabackup Manager

2,489 views

Published on

1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
2,489
On SlideShare
0
From Embeds
0
Number of Embeds
298
Actions
Shares
0
Downloads
37
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Introducing Xtrabackup Manager

  1. 1. Introducing XtraBackup Manager as told by Henrik Ingo, Percona Live UK 2012
  2. 2. [joe@bup01 /backup/udb] ls -laFh-rw-rw-r-- 1 xbm xbm 20 Feb 01 2012 userdb-2012-02-01.gz[joe@bup01 /backup/udb][joe@bup01 /backup/udb] zcat userdb-2012-02- 01.gz[joe@bup01 /backup/udb]
  3. 3. #!/bin/bashmysqldump -u web --password=j03r0cks! -h userdb.corp.com users | gzip > $BACKUPFILEif [ $? -ne 0 ]; then backupalert.sh "ALERT: Failure while backingup userdb!!"else writelog.sh "User DB Backup Complete!"fi
  4. 4. #!/bin/bashmysqldump -u web --password=j03r0cks! -h userdb.corp.com users | gzip > $BACKUPFILEif [ $? -ne 0 ]; then backupalert.sh "ALERT: Failure while backingup userdb!!"else writelog.sh "User DB Backup Complete!"fi
  5. 5. A few little facts...• XBM for short (cmd line tool)• Written in PHP5 (Object Oriented)• Leverages cron, netcat and ssh• Works on Linux and Solaris• GPLv2
  6. 6. So how does it work?...
  7. 7. QuickStart Guidehttp://code.google.com/p/xtrabackup-manager/wiki/QuickStartGuide
  8. 8. What you’ll need...• Server with plenty of storage space (management server) – MySQL 5.x+ – PHP 5.1.6+ (CLI)• mysql or root access to the servers• XtraBackup 1.6.4+
  9. 9. Installing...• Create UNIX user for XBM• Create MySQL user for XBM + Schema• Download latest tarball• Extract to xbm user homedir• Initialize the XBM schema: mysql xbm < ./sql/schema_init.sql
  10. 10. Setup SSH Trust...XBM user must be able to SSH withoutpassword: shell> ssh mysql@dbhost
  11. 11. InstallXtraBackup...• Download & Install XtraBackup 1.6.4+• Install on both backup server and DB hosts• Ensure XtraBackup is in $PATH too
  12. 12. ./xbm./xbm backup list./xbm volume add "mybackupdir" /home/xbm/backups/./xbm volume list./xbm host add localhost Just-testing./xbm host list./xbm backup add localhost monthlyBackup FULLONLY "30 03 01 * *" mybackupdir /var/lib/mysqlroot root./xbm backup list./xbm backup run localhost monthlyBackup./xbm snapshot list localhostls ../backups/ls ../backups/localhostls ../backups/localhost/*
  13. 13. Backup Strategies?• When do I take full backups?• When should I take incremental backups?• How many snapshots do I keep?• ... etc.
  14. 14. Backup Strategies!• Full Only• Continuous Incrementals• Rotating Sets of Incrementals
  15. 15. How about time to restore?
  16. 16. Enter Materialized Backups...
  17. 17. Materializedbackups mean less waiting...
  18. 18. Other neat features?...• Throttling• Email Alerts• Rich logging• Immediate Apply Logs• Did I mention 100% open source
  19. 19. What is it missing?
  20. 20. What is missing?• 1.0 release• pitr (copy binlogs)• compression• encryption• progress indicator• GUI
  21. 21. Meh... Any alternatives?• Zmanda Recovery Manager (ZRM)• Used to be open source in 2006• Still there, does support xtrabackup (and everything else)• GUI, a bell and 3 whistles included!
  22. 22. Try it out!Google Code: http://code.google.com/p/xtrabackup- managerMySQL Soapbox - (My Blog) http://mysqlsoapbox.blogspot.com
  23. 23. Thank you!

×