

Backup and Compress a MySQL Database With One Command - tlongren
http://longren.io/backup-and-compress-mysql-in-one-command/

======
Nanzikambe
Doing it that way will rape disk I/O on your server, much better use ZFS
snapshot then just zfs send & pipe thru xz/bzip2 to send it remotely

Example:

    
    
       #!/bin/bash
       TS=$(date "+%Y%m%d-%H%M%S")
       SNAP=zpool/mysql@${TS}
       zfs snapshot $SNAP
       zfs send $SNAP | pv | xz -z | ssh somewhere "cat > /mnt/snapshots/mysql-${TS}.xz"
       zfs destroy -Rv $SNAP
    

Assumes that your /var/lib/mysql is zpool/mysql ofc

~~~
morgo
I would say that the biggest risk with mysqldump is restore time.

If a significant portion of the buffer pool is in memory, it may actually dump
quite fast. MySQL 5.5 and above also have a modified LRU algorithm so that
tablescans (i.e. mysqldump) can only evict up to 3/8ths of the cache contents.

