In a previous post I showed how to mount a raided device that was plugged via usb, essential I needed to backup data from it. Additionally, I went further along to show how we could change the working root directory using chroot to use commands via that system. What I forgot to mention was how I went about backing up the MySql data.
So I switched my working directory using chroot, unfortunately some services didn't run properly including mysql commands. Either misconfigured parameters by the previous systems admin, or for whatever reason ...
Be it as it may I ended up using scp to do a secure copy to the desired remote host. The important thing to note is where all the mysql databases are located. Thus the command below sent my data to the backup location I desired.
This will backup the MySQL folder on the mounted partition to the home folder of the user logged into your computer. Here: /dev/md0 was my mounted point of my raided device.
To restore your data, simply upload the folder to your new installation by doing these tasks vice-versa.
Don't forget to restore the required permissions to the folder, if you have made the modification directly from the root account:
published by Alberto J. Matus