Search code examples
mysqldatabasecopybackup

Can I simply copy the mysql database folder in /var/lib/mysql/ to backup the database?


As mentioned in the subject, my question is whether I can simply copy the mysql database folder in /var/lib/mysql/ to backup the database? Would this cause issues anyhow?

Obviously the idea is to add the backup folder back into the server in case of data loss.

Thanks in advance.

Regards.


Solution

  • seem you can if your purpose it's to restore quickly mysql installation but i don't know exactly how much feasible could be in terms of space compared to simples automatic procedure for backup . ( you have a lot of alternative , for example with crontab you can see this crontab )