# 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:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![iouvps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iouvps/32/527360_2.png) [@iouvps](https://meta.discourse.org/u/iouvps)
#### Post date: [May 11, 2026, 2:11am UTC](https://meta.discourse.org/t/discourse/402623/1 "2026-05-11T02:11:24Z")

</div>

```plaintext
[2026-05-11 02:05:14] Reconnecting to the database...
[2026-05-11 02:05:14] Reloading site settings...
[2026-05-11 02:05:14] Disabling outgoing emails for non-staff users...
[2026-05-11 02:05:14] Running seed fu...
[2026-05-11 02:05:31] Disabling readonly mode...
[2026-05-11 02:05:31] Clearing category cache...
[2026-05-11 02:05:31] Reloading translations...
[2026-05-11 02:05:31] Remapping uploads...
[2026-05-11 02:05:31] Restoring uploads, this may take a while...
[2026-05-11 02:05:33] EXCEPTION: You can only specify one non-default checksum at a time.
[2026-05-11 02:05:33] /var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/seahorse/client/plugins/raise_response_errors.rb:17:in 'Seahorse::Client::Plugins::RaiseResponseErrors::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/sse_cpk.rb:24:in 'Aws::S3::Plugins::SseCpk::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/dualstack.rb:21:in 'Aws::S3::Plugins::Dualstack::OptionHandler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/accelerate.rb:43:in 'Aws::S3::Plugins::Accelerate::OptionHandler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/checksum_algorithm.rb:167:in 'Aws::Plugins::ChecksumAlgorithm::OptionHandler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:16:in 'Aws::Plugins::JsonvalueConverter::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/invocation_id.rb:16:in 'Aws::Plugins::InvocationId::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in 'Aws::Plugins::IdempotencyToken::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/param_converter.rb:26:in 'Aws::Plugins::ParamConverter::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/seahorse/client/plugins/request_callback.rb:89:in 'Seahorse::Client::Plugins::RequestCallback::OptionHandler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/response_paging.rb:12:in 'Aws::Plugins::ResponsePaging::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/seahorse/client/plugins/response_target.rb:24:in 'Seahorse::Client::Plugins::ResponseTarget::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/telemetry.rb:39:in 'block in Aws::Plugins::Telemetry::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/telemetry/no_op.rb:29:in 'Aws::Telemetry::NoOpTracer#in_span'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/telemetry.rb:53:in 'Aws::Plugins::Telemetry::Handler#span_wrapper'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/aws-sdk-core/plugins/telemetry.rb:39:in 'Aws::Plugins::Telemetry::Handler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.244.0/lib/seahorse/client/request.rb:72:in 'Seahorse::Client::Request#send_request'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/client.rb:17315:in 'Aws::S3::Client#put_object'
/var/www/discourse/lib/file_store/to_s3_migration.rb:216:in 'block (2 levels) in FileStore::ToS3Migration#migrate_to_s3'
[2026-05-11 02:05:33] Trying to rollback...
[2026-05-11 02:05:33] Rolling back...
[2026-05-11 02:05:34] Cleaning stuff up...
[2026-05-11 02:05:34] Dropping functions from the discourse_functions schema...
[2026-05-11 02:05:34] Removing tmp '/var/www/discourse/tmp/restores/default/2026-05-11-020447' directory...
[2026-05-11 02:05:34] Unpausing sidekiq...
[2026-05-11 02:05:34] Marking restore as finished...
[2026-05-11 02:05:34] Notifying 'niege' of the end of the restore...

```

How can I fix this issue?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 11, 2026, 2:22am UTC](https://meta.discourse.org/t/discourse/402623/2 "2026-05-11T02:22:47Z")

</div>

> [@iouvps](#):
>
> ```plaintext
> [2026-05-11 02:05:33] EXCEPTION: You can only specify one non-default checksum at a time.
> 
> ```

i think there may be a problem with the s3 compatibility?

is the instance you are restoring to up-to-date with Discourse latest version?

> [@iouvps](#):
>
> ```plaintext
> /var/www/discourse/lib/file_store/to_s3_migration.rb:216:in 'block (2 levels) in FileStore::ToS3Migration#migrate_to_s3'
> 
> ```

i think there is a problem here  
`/var/www/discourse/lib/file_store/to_s3_migration.rb`  
maybe with the payload being sent to `put_object` at line 216

> <https://github.com/Lillinator/discourse/blob/40a0caefd6d18a5c2f097dd1768714cd7f3d296f/lib/file_store/to_s3_migration.rb#L216-L219>

i’m not sure what the full solution is, but i think to get it working you may need to disable S3 (`enable_s3_uploads: false`) and do the restore and extract locally. then re-enable s3 use `rake uploads:migrate_to_s3` command?

---

<div class="post-metadata">

### Author: ![iouvps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iouvps/32/527360_2.png) [@iouvps](https://meta.discourse.org/u/iouvps)
#### Post date: [May 11, 2026, 2:40am UTC](https://meta.discourse.org/t/discourse/402623/3 "2026-05-11T02:40:24Z")

</div>

@Lilly  
Since the server has expired, we need to migrate to a new server. I have already backed up the Discourse data.  
Sync the app.yml file to the new server, then on the new server run:

```plaintext
./launcher rebuild app

```

Next, upload the backup data to the new server at /var/discourse/shared/standalone/backups/default.  
Use the following commands:

```plaintext
./launcher enter app
discourse enable_restore
discourse restore xxxxxxxxxxxxxxxxxxxxx.tar.gz

```

The restore failed. After rebuilding a new Discourse instance, I attempted to restore from the admin panel, but it still failed. Attached is the restore log:  
[log.txt](https://meta.discourse.org/uploads/short-url/AdggqvfW0TZ8J0ZXuDyGRTgF9Y3.txt) (124.0 KB)

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [May 11, 2026, 3:26am UTC](https://meta.discourse.org/t/discourse/402623/4 "2026-05-11T03:26:33Z")

</div>

Tell us about your environment, for example which object store are you using?

---

<div class="post-metadata">

### Author: ![iouvps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iouvps/32/527360_2.png) [@iouvps](https://meta.discourse.org/u/iouvps)
#### Post date: [May 11, 2026, 3:28am UTC](https://meta.discourse.org/t/discourse/402623/5 "2026-05-11T03:28:50Z")

</div>

Ubuntu 24.04.4 LTS (x86\_64)

Cloudflare R2

---

<div class="post-metadata">

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

</div>

@supermathie Is Cloudflare R2 incompatible?

---

<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

```

---

<div class="post-metadata">

### Author: ![iouvps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iouvps/32/527360_2.png) [@iouvps](https://meta.discourse.org/u/iouvps)
#### Post date: [May 11, 2026, 8:56am UTC](https://meta.discourse.org/t/discourse/402623/8 "2026-05-11T08:56:56Z")

</div>

@gerhard  
I tried this method, but it still doesn’t work.  
The current issue is that my server is already down. I only have the backup data and app.yml.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [May 11, 2026, 9:20pm UTC](https://meta.discourse.org/t/discourse/402623/9 "2026-05-11T21:20:12Z")

</div>

These values are noted in our [guide](https://meta.discourse.org/t/step-by-step-discourse-migration-with-r2-and-cloudflare-integration/382491).

Can you post the redacted ENV block here so we can see if something else is wrong?

---

<div class="post-metadata">

### Author: ![iouvps](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iouvps/32/527360_2.png) [@iouvps](https://meta.discourse.org/u/iouvps)
#### Post date: [May 13, 2026, 4:23am UTC](https://meta.discourse.org/t/discourse/402623/10 "2026-05-13T04:23:17Z")

</div>

Now we’re trying to recover the data, but rake uploads:migrate\_to\_s3 keeps failing.

---

<div class="post-metadata">

### Author: ![xlg256](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xlg256/32/555005_2.png) [@xlg256](https://meta.discourse.org/u/xlg256)
#### Post date: [May 18, 2026, 2:00am UTC](https://meta.discourse.org/t/discourse/402623/11 "2026-05-18T02:00:56Z")

</div>

Did you try to downgrade aws-sdk-s3:

> [@Can't rebuild due to AWS SDK gem bump and new AWS Data Integrity Protections](https://meta.discourse.org/t/cant-rebuild-due-to-aws-sdk-gem-bump-and-new-aws-data-integrity-protections/354217/49):
>
> But I did for a site that’s using Backblaze. I created a template I put in /root/aws-revert-template.yml with this: # This template reverts aws-sdk-s3 to a version that works with backblaze params: home: /var/www/discourse hooks: after\_bundle\_exec: - exec: cd: $home cmd: - bundle config set frozen false - "sed -i 's/gem \"aws-sdk-s3\", require: false/gem \"aws-sdk-s3\", \"1.177.0\", require: false/' Gemfile" - bundle update aws-sdk-s3 …

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 1, 2026, 1:43pm UTC](https://meta.discourse.org/t/discourse/402623/12 "2026-08-01T13:43:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
