1

I'm building my Craft site locally, but need to make it live. When I go into Utilities -> Database Backup and try to create a backup, I get the error "There was a problem backing up your database. Please check the Craft logs."

I checked the log and see this:

  Could not create backup: The shell command "mysqldump --defaults-extra-file="C:\wamp64\www\craft\storage\runtime\temp\my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --single-transaction --no-data --result-file="C:\wamp64\www\craft\storage\backups/build-your-firm_200624_180437_9nnsavzxmh_v3.4.24.sql" stw && mysqldump --defaults-extra-file="C:\wamp64\www\craft\storage\runtime\temp\my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-create-info --ignore-table=stw.stw_assetindexdata --ignore-table=stw.stw_assettransformindex --ignore-table=stw.stw_sessions --ignore-table=stw.stw_templatecaches --ignore-table=stw.stw_templatecachequeries --ignore-table=stw.stw_templatecacheelements --ignore-table=stw.stw_cache --ignore-table=stw.stw_templatecachecriteria stw >> "C:\wamp64\www\craft\storage\backups/build-your-firm_200624_180437_9nnsavzxmh_v3.4.24.sql"" failed with exit code 1. in C:\wamp64\www\craft\vendor\craftcms\cms\src\controllers\UtilitiesController.php:340

I don't really know how to resolve that. Can I get around this by making a database backup in PhpMyAdmin?Is there any difference?

Thanks in advance.

1

The database backup from Craft is slightly different to the SQL export in phpMyAdmin. Craft’s export (presumably) assumes you’re going to want to import that data into an existing site, whereas phpMyAdmin’s default (presumably) assumes you’ll want to import it into an empty database.

However you can do exactly as you suggest — export from phpMyAdmin locally, create a new Craft installation on your live server, use phpMyAdmin on the live server to delete the new database’s contents, then import the original data with phpMyAdmin.

I did this a few months ago (long story); it worked fine, nothing has exploded so far.

| improve this answer | |
  • I will give that a shot, thank you! – JacobWeiss Jun 25 at 1:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.