Performing MySQL Backups Using LVM Snapshots
Performing MySQL Backups Using LVM Snapshots
Presented by,
MySQL AB® & O’Reilly Media, Inc.
2008-04-16
MySQL Conference & Expo 2008
Santa Clara, CA, USA
Introduction to LVM
Features, Benefits, Terminology, Tools
LVM Snapshots
Overview, Features, Use case
Backing up MySQL using Snapshots
Benefits, Procedure, Caveats
mylvmbackup
Practical hints & recommendations
Related tools & technologies
Introduction to LVM
Storage Virtualisation / Abstraction for
Linux
Initially developed by Sistina (now
Red Hat)
More flexible than partitioned disks:
Online adding/removing of volumes
Online resizing/moving of volumes
Grouping of volumes
Beneficial for both large and small
storage systems
Terminology
Commandline
PVs: pvcreate, pvdisplay, pvmove, pvresize ...
VGs: vgcreate, vgdisplay, vgextend, vgreduce ...
LVs: lvcreate, lvdisplay, lvextend, lvreduce...
YaST2 (openSUSE/SLES)
Disk Setup & system-config-lvm
(Fedora/RHEL)
IBM EVMS tools (GUI, CLI)
LVM GUI (Java)
LVM Snapshots
FLUSH TABLES
FLUSH TABLES WITH READ LOCK
Create the snapshot (lvcreate -s)
(SHOW MASTER STATUS)
UNLOCK TABLES
Mount snapshot, perform backup
Unmount and discard the snapshot
(lvremove)
Caveats / Gotchas
ZFS snapshots/clones
SAN snapshots
ext3cow
Time Machine (Mac OS X)
Veritas Volume Manager (VxVM)
Volume Shadow Service (VSS) for MS
Windows Server 2003
SGI XVM / HP-UX LVM
Q&A
Any questions/suggestions/ideas?