Skip to main content

Backup to Mega S4 partial fail

Comments

7 comments

  • cPRex Jurassic Moderator

    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
  • Mario Figge

    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:

    1. If using chunked payload, and x-amz-decoded-content-length is missing.
    2. If using chunked payload, and x-amz-decoded-content-length is 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
  • cPRex Jurassic Moderator

    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
  • Mario Figge

    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
  • cPRex Jurassic Moderator

    Hopefully that's all it takes!

    0
  • Mario Figge

    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
  • cPRex Jurassic Moderator

    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.