I have a production server whose MYSQL may not be backed up. The instance in question has an EBS backed root device (/dev/sda1), which is persistently storing files. It's not clear to me whether it is naturally storing my MYSQL data and binary log files persistently.
Should it do so if it's mounted at root? I would think so.
Should I instead attach and mount another volume and then point the MYSQL server at the new location?
My commands look like the following (plus locking the MYSQL table while creating the snapshot)
sudo mkdir /vol/etc /vol/lib /vol/log
sudo mv /etc/mysql /vol/etc/
sudo mv /var/lib/mysql /vol/lib/
sudo mv /var/log/mysql /vol/log/
sudo mkdir /etc/mysql
sudo mkdir /var/lib/mysql
sudo mkdir /var/log/mysql
echo "/vol/etc/mysql /etc/mysql none bind" | sudo tee -a /etc/fstab
sudo mount /etc/mysql
echo "/vol/lib/mysql /var/lib/mysql none bind" | sudo tee -a /etc/fstab
sudo mount /var/lib/mysql
echo "/vol/log/mysql /var/log/mysql none bind" | sudo tee -a /etc/fstab
sudo mount /var/log/mysql
I am no sys admin expert and I don't want to screw up my existing database. Is there any risk here? Should I even bother with an additional device here or just stick with the built in root device?