Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Backup and Compress All Databases On Your MySQL Server - More Disk I/O Friendly
#!/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
@tlongren

This comment has been minimized.

Copy link
Owner Author

tlongren commented Aug 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.