First page Back Continue Last page Overview Graphics
Backup Agents and Tools
Raw: LVM Snapshots
Any disk based table type can be backed up with snapshots. The external tools that can be used to accomplish this includes LVM/filesystem level snapshots, the tool mysqlsnapshot, as well as commercial backup tools such as True Image and Veritas Filesystem.
If backing up InnoDB table types, LVM/filesystem snapshots are fine without flush locks. The files on the disk are consistent and can be rebuilt from the undo and redo logs. Thus, InnoDB LVM/filesystem snapshots can be easily scripted or put in a cronjob:
Filesystem LVM Snapshots (XFS on LVM2) w/InnoDB tables:
# xfs_freeze -f /var/lib/mysql \
&& lvcreate -L 500M -s -n snap /dev/vgmysql/prod \
&& mount -o nouuid,ro /dev/mapper/vgmysql-snap1
/var/lib/mysql-snap \
;xfs_freeze -u /var/lib/mysql \
&& tar czvf /dev/tape /var/lib/mysql-snap
&& umount /var/lib/mysql-snap \
&& lvremove -f /dev/vgmysql/snap
Notes: