mirko-pagliai / cakephp-database-backup

DatabaseBackup is a CakePHP plugin to export, import and manage database backups
Other
19 stars 3 forks source link

Can't find mysqldump even after setting its path. #59

Closed Mark-Lister closed 4 years ago

Mark-Lister commented 4 years ago

I've been trying to implement this plugin but it can't seem to find mysqldump. In my bootstrap.php file I set the binary using

Configure::write('DatabaseBackup.bin.mysqldump', '/backups/mysqldump');
Configure::write('DatabaseBackup.connection', 'default');
Plugin::load('DatabaseBackup');

Which is my path to mysqldump but it still doesn't seem to work. I am using CakePHP 3.6.15 and just installed the plugin for cakephp3 I'm just running sudo bin/cake backup export but it say's it can't find the binary.

mysql  Ver 14.14 Distrib 5.7.26
mysqldump  Ver 10.13 Distrib 5.7.26

Thanks.

Mark-Lister commented 4 years ago

It seemed to fix itself when I changed Plugin::load('DatabaseBackup'); To.. Plugin::load('DatabaseBackup', ['bootstrap' => true]);

mirko-pagliai commented 4 years ago

Hello @Mark-Lister,

thanks for your report. Yes, the bootstrap is essential for the plugin to function properly.