Using dd you can make a bit for bit clone of a harddrive/partition. dd takes two parameters. if, the source and of, the destination. dd if=/dev/sda of=~/backup.img This will make a copy of the entire disk, if you were to put sda1 you’d get the first partition. Make sure to only run these commands when there is no activitiy on the disk. If you are using LVM you can make a snapshot of the data and run it against that.
MySQL stores all its data in the following location /var/lib/mysql/<database> Simply make a copy of these files and you have a backup, when restoring make sure its owned by mysql.