UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › WebDAV upload does not work with Nextcloud
- This topic has 4 replies, 2 voices, and was last updated 1 week ago by Vanessa.
-
AuthorPosts
-
December 10, 2024 at 1:37 pm #2318277Thomas LowParticipant
Hi UpdraftPlus-Team,
I manage a WordPress instance that uses UpdraftPlus to upload its backup to a managed Nextcloud (Hetzner).
Since about two weeks ago, the upload fails with the following error message:
0040.334 (0) WebDAV: Enable chunked upload: yes 0040.335 (0) WebDAV: Upload chunk size: successfully changed to 2097152 bytes 0040.889 (0) WebDAV: Unexpected HTTP response code (400): 400 (Bad Request. The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).) 0040.889 (0) WebDAV: Chunk 1: A write error occurred 0040.890 (0) WebDAV: ERROR: WebDAV: Failed to upload file: ...
You can replicate the problem with the official Docker Nextcloud images 29 and 28. In Nextcloud 28 the upload works, in 29 the upload fails. There is no error message in Nextcloud. Other WebDAV clients work without any issues.
UpdraftPlus: 2.24.11.1
WordPress: 6.7.1Best regards,
ThomasDecember 10, 2024 at 1:37 pm #2318278Thomas LowParticipantThis reply has been marked as moderator-only.December 10, 2024 at 8:04 pm #2318579VanessaModeratorCan you try reducing your archive split to 50 MB in settings >> show expert settings >> split archives every
Can you then run a backup and post the log using a tools such as pastebin.com?December 10, 2024 at 11:36 pm #2318717Thomas LowParticipantHello UpdraftPlus-Team,
I traced the problem to the following error message from sabre dav in Nextcloud, which is only visible when debug logging is enabled in Nextcloud:
BadRequest Content-Range on PUT requests are forbidden.
In the UpdraftPlus “webdav.php”, this Content-Range HTTP header is only set if the option “Split uploads into chunks” is enabled.
I disabled this option, and now the upload works again.
As far as I know, we always had this option enabled without any apparent issues. However, in previous UpdraftPlus log files, I could find messages reporting that a failed “chunked” upload was tried again automatically and succeeded:
0059.329 (0) WebDAV: Enable chunked upload: yes 0059.329 (0) WebDAV: Upload chunk size: successfully changed to 2097152 bytes 0059.812 (0) WebDAV: WebDAV server returned 400 due to Content-Range issue; will try all-at-once method 0061.716 (0) WebDAV: WebDAV: All-in-one write succeeded
I guess something changed such that your plugin doesn’t detect the Content-Range issue any more. Because of that, the upload fails.
Anyway, my problem is solved now.
Best regards
ThomasDecember 11, 2024 at 7:26 pm #2319407VanessaModeratorHi,
Thank you for the update
In this guide: https://updraftplus.com/hacking-updraftplus/
You can also use “UPDRAFTPLUS_WEBDAV_NEVER_CHUNK” in the wp-config to stop the files being sent in chunks;“UPDRAFTPLUS_WEBDAV_NEVER_CHUNK: When using WebDAV, don’t attempt to send the backup file(s) in chunks – instead, send it all in one go. (Apache’s mod_dav supports chunks; most other WebDAV servers don’t, and occasionally there’s an exotic one that doesn’t manage to even send a useful error code back so that UpdraftPlus can respond – in that case, this define can be useful).”
-
AuthorPosts
- You must be logged in to reply to this topic.