# Failed to restore data after migrating Discourse

**URL:** https://meta.discourse.org/t/discourse/402623
**Category:** Self-hosting
**Created:** [May 11, 2026, 2:11am UTC](https://meta.discourse.org/t/discourse/402623 "2026-05-11T02:11:24Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [May 11, 2026, 7:47am UTC](https://meta.discourse.org/t/discourse/402623/7 "2026-05-11T07:47:07Z")

</div>

Yes, there seems to be an incompatibility with R2.

Untested, but you could try this:

Environment variables are set in your container’s `app.yml` under the `env` block — the same place you already have things like `DISCOURSE_S3_ACCESS_KEY_ID`. Just add the two vars there:

```yaml
env:
  LANG: en_US.UTF-8
  # ... your existing vars ...
  DISCOURSE_S3_BUCKET: your-r2-bucket
  DISCOURSE_S3_ACCESS_KEY_ID: ...
  DISCOURSE_S3_SECRET_ACCESS_KEY: ...
  DISCOURSE_S3_ENDPOINT: https://<account>.r2.cloudflarestorage.com

  # Fix for Cloudflare R2 checksum incompatibility with aws-sdk-s3
  AWS_REQUEST_CHECKSUM_CALCULATION: when_required
  AWS_RESPONSE_CHECKSUM_VALIDATION: when_required

```

Then rebuild the container:

```bash
./launcher rebuild app

```

---

_[View the full topic](https://meta.discourse.org/t/discourse/402623)._
