Skip to content

Upstream issues with boto in Duplicity #2549

@elsiehupp

Description

@elsiehupp

For a couple weeks I've been getting this message from Mail-in-a-Box every time it runs a backup.

WARNING: Using boto3 >= 1,36.0 with non-amazon s3 services may result in checksum errors. a workaround is to set the following env vars

    export AWS_REQUEST_CHECKSUM_CALCULATION=when_required
    export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required

see https://gitlab.com/duplicity/duplicity/-/issues/870 for details.

Note that, yes, I am in fact using a non-Amazon service for object storage.

I didn't find a relevant Issue here, but I found someone reporting the same message on the MiaB Discourse, so I initially responded there.

As best I can tell, the solution to this problem is to add the environmental variables to /etc/environment. One way to do this is with nano.

First, ssh into your Box. Then:

sudo nano /etc/environment

In nano, scroll down one line, paste the following:

export AWS_REQUEST_CHECKSUM_CALCULATION=when_required
export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required

(You may want to add an extra line break at the end, hence the blank line in the blockquote.)

Next, type Ctrl-O to save the file, then Ctrl-X to exit nano.

The environmental variables should take hold the next time the server is rebooted (I think?), so if you want to make sure they've taken hold, you can manually force-restart with the following:

sudo reboot

Note that there are other, more elegant ways to add these environmental variables, such as with echo and >>, but I'm not sure how to put the sudo in the correct place for that, hence just using nano.

After rebooting, you can ssh in again check the variables with echo:

echo "$AWS_REQUEST_CHECKSUM_CALCULATION"

Should print when_required, and

echo "$AWS_RESPONSE_CHECKSUM_VALIDATION"

Should also print when_required.

Anyway, I feel like probably these environmental variables could be set by the MiaB installer without any detrimental side effects, and adding this action to the MiaB installer would probably count as a "fix" for this Issue I am creating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions