Backup to Mega S4 partial fail
I have 3 servers configured to backup to the new Mega S4 service as an aditional destination.
It claims to be S3 compatible so I used that option in WHM.
The files upload, but only small files. Around 20Mb max. Everything bigger fails.
The backup transport error just says "Unable to send xxxx to destination yyyy"
Otherwise, if I manually use s3cmd with the same parameters, the files are uploaded fine, no matter the file size.
Any suggestion?
-
Hey there! I don't have any suggestions based off that information, but it's always best to start by checking the logs. You'd find th remote backup transporter log in the /usr/local/cpanel/logs/cpbackup_transporter/ directory, and then each day will have a unique log file.
Do you see anything in that log that looks like helpful information?
0 -
Thank you, yes, there is more info.
The error in all not uploaded files is:
[2025-07-09 15:47:26 -0300] warn [cpbackup_transporter] Upload attempt failed: Amazon::S3: Amazon responded with 400 Bad Request at /usr/local/cpanel/3rdparty/perl/536/cpanel-lib/Amazon/S3/Bucket.pm line 192.
Mega S4 Github docs (https://github.com/meganz/s4-specs?tab=readme-ov-file#putobject) details 3 cases that generates that reply:
1. Returned in cases where there are invalid/missing arguments in the request. Particularly:- If using chunked payload, and
x-amz-decoded-content-lengthis missing. - If using chunked payload, and
x-amz-decoded-content-lengthis not valid.
This may happen in case of chunked payload when the provided header does not have a valid value.
2. Returned if the Content-MD5 does not match the MD5 computed while uploading.
3. Key of an object containing payload is not allowed to end with'/'in S4.
Line 192 is part of multipart upload process, so it has sense it affect only bigger files, as there are divided in parts. But I do not have knowledge on perl to discover more.0 - If using chunked payload, and
-
Thanks for the additional details. In WHM >> Backup Configuration under the "Additional Destinations" tab there is a timeout option at the bottom. By default that gets set to 30 seconds, so it would be worth increasing that to at least 300 to see if that changes the behavior.
If that doesn't change the behavior of the system it might be best to speak with Amazon since the error is coming from their side.
0 -
Thank you, I changed the parameter. And pointed one of the servers to a different endpoint.
I do backups on weekend so we see what happens and update this thread.As I stated before this is Mega S4, not Amazon, but it claims to be compatible. It is a relatively new service.
Mario
0 -
Hopefully that's all it takes!
0 -
Update: It didn't work changing the timeour parameter. In one of the server I changed the access point too, with no results.
I can upload without problems using other methods, but cpanel additional destination script.
0 -
It seems like the tool may not be fully compatible with the S3 system if you're still getting the "bad request" error. It might be best to reach out to them to see if they can identify any issues on their end.
0
Please sign in to leave a comment.
Comments
7 comments