Failed to restore data after migrating Discourse

[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?

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?

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

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?

@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:

./launcher rebuild app

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

./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 (124.0 KB)

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

Ubuntu 24.04.4 LTS (x86_64)

Cloudflare R2