I have followed the instructions for this article (https://craftcms.com/guides/database-backups-in-craft-3-with-mamp) to get local backups working with MAMP. However, when I attempt a backup, I get this error: exit code 127: sh: mysqldump: command not found
.
which mysqldump
returns /Applications/MAMP/Library/bin/mysqldump
and I can dump a db successfully from the terminal using 'mysqldump` but it does not work from the Craft CP for backing up a DB or when Craft tries to backup a DB when running an update.
Is there something else I should be doing?
The help article referred to above seems to make it pretty clear that this should work.
UPDATE:
After further testing, it seemed that those .env
variables just did not seem to be getting used after I added...
'backupCommand' => getenv('BACKUP_COMMAND'),
'restoreCommand' => getenv('RESTORE_COMMAND'),
...to my general.php
.
So I tried adding this module instead and now DB backups work as expected.
I'd still be curious to hear from anyone at Craft as to what could be missing in that first method they've laid out.