-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Craft 3 Database Backups Failing #2364
Comments
That's weird... The stack trace you provided is from the Database backup utility. Can you share the stack trace for the error when backing up during an update? Have you made any |
Thanks for the reply. I haven't made any changes to the .htaccess file. Here's what I have:
Here's the stack trace for the error when backing up during an update.
|
The utilities backup stack trace is complaining because it's expecting a required value to be in POST with a key of Code-wise, I'm having a hard time seeing how that key wouldn't exist or it would have an empty value: https://github.com/craftcms/cms/blob/develop/src/web/assets/dbbackup/dist/DbBackupUtility.js#L35-L40 The 2nd stack trace is just a 503 status for when someone hits the front-end of the site while Craft is in "maintenance mode" when updating a site. The update error should be somewhere else in the logs for this case. |
Is this the correct error? I'm a little unsure of where I'm suppose to look. |
@jonlivingston for the 2nd one (where you can an error backing up during an update), can you reproduce with devMode enabled, the share a zip of your |
@angrybrad devMode is enabled and I tried updating Craft. Here's the stack trace. The log files are attached. Thanks for trying to get an answer on this.
|
Ahh... here's the error from the failed backup during updating:
Which is just saying that Craft/PHP can't find the The first error from the backup utility still doesn't make sure, but I'd fix the |
Ahh! Thank you @angrybrad! If anyone runs into this issue not being able to update Craft 3 using MAMP or MAMP Pro here's what was done to resolve the issue. Create an "envvars" file with the following code: Place it in the following directory: |
I'm getting this same issue on Mac OS, not using MAMP. Any ideas on how I'd resolve this? |
@codyjames regardless of the development stack you are using, |
Hi @angrybrad. I can understand that the backup process depends on the Thanks. |
@juban fair points. should probably also mention there is a backupCommand config setting, which can be set to run any logic you want. i.e. shell script, http request, etc. where you could remove the |
@angrybrad Thank you for your feedback. I'll take a look to that |
@jonlivingston What's an "envars" file? Trying to do this on Windows and not sure what to save the file as. I'm assuming it's not just "envars" with no file extension? |
@jonlivingston Part of the way there for me, seemed like I needed to symlink these binaries into
|
Just a heads up for anyone still struggling with this, there's a guide on the craft site: https://craftcms.com/guides/database-backups-in-craft-3-with-mamp |
⬆️ the above also solves a related issue with the FeedMe plugin failing. |
I solved this issue with Craft not finding the |
What would be the way to resolve this under Windows (I'm using XAMPP)? Here's an excerpt from my log file when a backup fails:
When I run It's in my Finally, not sure if it's relevant or not, but both What am I missing? |
That indicates it found Create a
Then execute this from the command line and see if that works:
|
That works, but then again, the built-in backups somehow started working as well. :-| Incidentally, the EDIT: I just tried updating to 3.2 again now, and once again it wasn't able to backup the database. It asked me if I wanted to continue anyway or revert the backup. I chose to revert, after which the Utilities -> Database Backup tool began failing again with the same EDIT 2: A few interesting findings:
|
@angrybrad Beep! :) |
@proimage yeah... I'm out of ideas. I installed the latest XAMPP on Windows 10 and I'm not able to reproduce that behavior. It's got to be something environmental? |
Hmm, ok. Well, since I can reliably "fix" things by restarting Apache (which takes seconds), it's not the end of the world. :) Thanks anyway! |
|
Followed these instructions precisely to try to fix the problem both with backup and feedme: https://craftcms.com/guides/database-backups-in-craft-3-with-mamp But i still get an error in logs. Anybody else solve this issue? Really need some help. |
@kinw3b Can you email your logs over to [email protected] ? |
Description
When running a database backup, either manually from the admin panel (Utilities > Database Backup > Backup) or the auto backup when craft is in the process of updated itself, the backup fails with the following error:
Couldn’t backup the database. How would you like to proceed?
Note I'm using MAMP Pro.
Steps to reproduce
Additional info
When looking at logs I get the following:
yii\web\HttpException:400
yii\web\BadRequestHttpException: Request missing required body param in /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/web/Request.php:497
Stack trace:
#0 /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/controllers/UtilitiesController.php(376): craft\web\Request->getRequiredBodyParam('params')
#1 [internal function]: craft\controllers\UtilitiesController->actionDbBackupPerformAction()
#2 /Users/jon/Sites/onboardcreative/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/jon/Sites/onboardcreative/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/web/Controller.php(80): yii\base\Controller->runAction('db-backup-perfo...', Array)
#5 /Users/jon/Sites/onboardcreative/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('db-backup-perfo...', Array)
#6 /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/web/Application.php(251): yii\base\Module->runAction('utilities/db-ba...', Array)
#7 /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/web/Application.php(453): craft\web\Application->runAction('utilities/db-ba...', Array)
#8 /Users/jon/Sites/onboardcreative/vendor/craftcms/cms/src/web/Application.php(211): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 /Users/jon/Sites/onboardcreative/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 /Users/jon/Sites/onboardcreative/web/index.php(21): yii\base\Application->run()
#11 {main}
The text was updated successfully, but these errors were encountered: