MarkE Posted April 1, 2023 Share Posted April 1, 2023 A slightly odd case this: I have a WSL/Docker/ddev setup that has been working very well. Then, for no apparent reason, Docker Desktop failed to start the docker engine. I tried all the suggested fixes without success so decided to uninstall it and run Docker from within WSL instead. After successfully doing that, I found that the db was empty so PW would not run. I imported a recent backup database from the production site into the empty db using phpMyAdmin and it appeared to be OK. However, on running the PW site, I got a 500 error. I tried importing an old dev backup and that worked OK. So, now I had PW running in dev, but not with the latest database. I then tried to use the PW backup tools to download the latest version from the live site and upload it into the dev site and got the following message after clicking 'upload': ProcessDatabaseBackups: File could not be downloaded (https://[Database path].sql) 403 Forbidden: (tried: curl) Any idea what might be causing this and how to fix it? At the moment I am stuck without being able to work on a current database version and can't get it successfully imported via either phpMyAdmin or PW. One thing that looks rather odd is that the message says it can't be downloaded (not uploaded) and that the database path given is a path to site/assets/files on the LIVE site. EDIT: Also, I see that the uploaded backup IS listed on the backups page. However, restoring it results in errors*. All a bit random and confusing! * The error appear to be because not all modules are loaded. Commenting out the calls and refreshing the modules seems to fix this. Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 2, 2023 Share Posted April 2, 2023 6 hours ago, MarkE said: File could not be downloaded Do you use the on-demand file download (https://processwire.com/blog/posts/pw-3.0.137/#on-demand-mirroring-of-remote-web-server-files-to-your-dev-environment)? If so... disable it. It's perfectly fine within a running setup but once in a while it's not working as expected. 1 Link to comment Share on other sites More sharing options...
bernhard Posted April 2, 2023 Share Posted April 2, 2023 ddev import-db -f site/assets/backups/database/db.sql is a very helpful command that can import dumps without PW running ? 1 Link to comment Share on other sites More sharing options...
MarkE Posted April 7, 2023 Author Share Posted April 7, 2023 On 4/2/2023 at 2:13 AM, wbmnfktr said: It's perfectly fine within a running setup but once in a while it's not working as expected. Added a fix for the on-demand mirroring at the beginning of the hook: //Don't execute for backups!! $backtrace = DEBUG::backtrace(); foreach($backtrace as $item) { if(strpos($item['file'], 'ProcessDatabaseBackups')) return; } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now