Location of S3 backup settings

I’ve been getting the same message:

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.

And this is the only remotely relevant thread, so I’m responding here.

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.

I just cross-posted this as an Issue on the MiaB GitHub, since I feel like probably these environmental variables could be set by the MiaB installer without any detrimental side effects.

1 Like