Is it safe to copy DB files directly from an LVM snapshot? I saw two different approaches for backing up database with LVM snapshot. This article suggests spawning another MySQL instance to do an SQL dump. MYSQL Performance Blog suggests that it is safe to copy directly the database files:


  6) Copy data to backup. Normally you can skip slow query logs and
  error log while taking backup. You also can skip most of binary logs –
  however if some of your slaves are far behind you might want to keep
  some of last binary logs just in case, or you can assume in case of
  recovery from the backup you will need to restore slaves as well and
  skip binary logs in your backup process.


For database in InnoDB format, is it ok that I just backup the /var/lib/mysql/ folder?
Yes, it is safe. There is a tool http://www.lenzg.net/mylvmbackup/ that uses LVM snapshots to take backups of MySQL.

From InnoDB's standpoint a backup copy taken with LVM snapshots looks like as InnoDB has suddenly crashed. When you start MySQL from the backup copy it will start crash recovery. To save some time it's better to do the crash recovery immediately after the backup is taken.