1

When attempting to backup with Craft, the system returns the following error:

The shell command "mysqldump --defaults-extra-file="D:\local\Temp\my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --single-transaction --no-data --result-file="D:\home\site\wwwroot\storage\backups/feedme-210122_193236_orhnxunfoa.sql" tusabcraft && mysqldump --defaults-extra-file="D:\local\Temp\my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --no-create-info --ignore-table=tusabcraft.craft_assetindexdata --ignore-table=tusabcraft.craft_assettransformindex --ignore-table=tusabcraft.craft_sessions --ignore-table=tusabcraft.craft_templatecaches --ignore-table=tusabcraft.craft_templatecachequeries --ignore-table=tusabcraft.craft_templatecacheelements --ignore-table=tusabcraft.craft_cache --ignore-table=tusabcraft.craft_templatecachecriteria tusabcraft >> "D:\home\site\wwwroot\storage\backups/feedme-210122_193236_orhnxunfoa.sql"" failed with exit code 2. - Connection.php: 597.

Backups worked fine when using MySQL in-app, but it is now connecting to an external MariaDB. Everything except this works fine on the installation. Looking up exit code 2 indicates a permission issue, maybe connecting to the DB?

Has anybody dealt with this? The most helpful thing I could find in the docs was this, but not sure how to implement it:

https://craftcms.com/docs/3.x/config/config-settings.html#backupcommand

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.