问题
According to documentation, if you are using MYISM, it should be possible to take physical backup of MySQL. i.e. copying data files. But in order to take "Physical Backup" for INNODB Engine, you need MysqlEnterprise. I am not using MySQL Enterprise at the moment and have Database of size 100GB. I do not want to use mysqldump but want to do a physical backup. Is there a way to achieve this ?
回答1:
Percona XtraBackup is free and open-source, and works with free, open-source distributions of MySQL and its derivatives that use InnoDB.
https://www.percona.com/software/mysql-database/percona-xtrabackup
When used in combination with Percona Server for MySQL, Percona XtraBackup provides the only true non-blocking online, real-time backup of transactional systems currently available.
In fact Percona XtraBackup works fine with MySQL Community Edition too.
回答2:
If you are willing to stop mysqld for long enough to copy the entire /.../mysql/ tree, then you can take a physical backup.
If you have LVM already set up, then the down time is a minute or so, regardless of the dataset size: Stop mysqld; take LVM snapshot; restart mysqld; then copy the shapshot to elsewhere; (and turn off LVM).
来源:https://stackoverflow.com/questions/42502214/how-to-take-physical-backup-for-non-enterprise-mysql-innodb-engine