not sure its a stack overflow question
I have a Mac and am hosting a Apache MySQL
server on it using MAMP Pro
. If I back up my data on the time machine, is MySQL
database also backed up or do I have to create mysqldump
and backup up as a cron job
? In case of a crash do I do a normal restore in case it can be backed up on time machine.
Thanks
Make a regular dump with MySQL dump or use another specific database back-up tool. A copy of the data folder is not ok.
MySQL dump will really read the data and can be checked. It is not always true that all data is written completely to the data file and lockings give issues.
If you have a specific time of back-up just run a cron before that moment and verify whether it is safe and finished. MySQL will take care of lockings, changes, transactions etc.
Always, read always, verify your back-up with a restore test.