Error uploading backup to B2

AI-generated summary

marianord reported an error when attempting to upload a Discourse backup to Backblaze B2, characterized by SSL read failures and repeated “Checksum Type mismatch” exceptions indicating a discrepancy between expected CRC32 checksums and null actual values. Although the process had functioned until mid-December, it began failing with the current setup. supermathie inquired about version differences, while bondero noted that marianord was using Ruby 3.3.0 (later updated to 3.4.0 in the stack trace) and highlighted that the configuration included AWS_REQUEST_CHECKSUM_CALCULATION and AWS_RESPONSE_CHECKSUM_VALIDATION variables. bondero identified the root cause, referencing a known issue where B2 does not fully support these new AWS data integrity protection features. Upon removing the problematic checksum configuration variables, marianord confirmed the backup process completed successfully.

I’m facing issues with backing up my Discourse instance, the instance is setup to upload to Backblaze’s B2.

Error log:

Making sure archive does not already exist...
Creating empty archive...
Archiving data dump...
Archiving uploads...
Skipping uploads stored on S3.
Removing tmp '/var/www/discourse/tmp/backups/default/2026-01-16-151337' directory...
Gzipping archive, this may take a while...
Uploading archive...
EXCEPTION: failed to abort multipart upload: SSL_read: unexpected eof while reading. Multipart upload failed: Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:103:in `rescue in abort_upload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:90:in `abort_upload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:86:in `upload_parts'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:59:in `upload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/file_uploader.rb:42:in `block in upload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.227.0/lib/aws-sdk-core/plugins/user_agent.rb:90:in `metric'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/file_uploader.rb:40:in `upload'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/customizations/object.rb:477:in `block in upload_file'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.227.0/lib/aws-sdk-core/plugins/user_agent.rb:90:in `metric'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/customizations/object.rb:476:in `upload_file'
/var/www/discourse/lib/backup_restore/s3_backup_store.rb:48:in `upload_file'
/var/www/discourse/lib/backup_restore/backuper.rb:351:in `upload_archive'
/var/www/discourse/lib/backup_restore/backuper.rb:41:in `run'
script/discourse:115:in `backup'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor/command.rb:28:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor.rb:538:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/thor-1.4.0/lib/thor/base.rb:584:in `start'
script/discourse:397:in `<top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in `load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in `kernel_load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:452:in `exec'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor.rb:538:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:35:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/cli.rb:29:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/exe/bundle:28:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.6.4/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Deleting old backups...
Cleaning stuff up...
Removing archive from local storage...
Removing '.tar' leftovers...
Marking backup as finished...
Notifying 'system' of the end of the backup...
Finished!
[FAILED]

Has this worked previously?

Yes, it worked until ~mid-December.

Presuming it stopped working after an upgrade, do you know the version where it was working (knowing the filename of the last successful backup would help) and the version you’re at now?

I’ll try to find the old files, I was doing some cleanup and deleted before checking :man_facepalming:t2:.

I know this one `v20251209012613` was already failing. Will try to recover the older files to see when it stopped working.

I just got backblaze working on a fresh install, and by the looks of it you’re on older version of discourse - the version of ruby in your stacktrace is 3.3.0 and on mine it’s 3.4.0. Not sure if it’d make a difference, as the versions of aws-sdk-core and aws-sdk-s3 gems seem to be the same, but I thought it may be worth pointing out.

I just retried and got the same error.

Setup:

  AWS_REQUEST_CHECKSUM_CALCULATION: WHEN_REQUIRED
  AWS_RESPONSE_CHECKSUM_VALIDATION: WHEN_REQUIRED
  DISCOURSE_USE_S3: true
  DISCOURSE_S3_REGION: "us-west-004"
  DISCOURSE_S3_INSTALL_CORS_RULE: false
  DISCOURSE_S3_CONFIGURE_TOMBSTONE_POLICY: false
  DISCOURSE_S3_ENDPOINT: 'https://s3.us-west-004.backblazeb2.com'
  DISCOURSE_S3_ACCESS_KEY_ID: '******'
  DISCOURSE_S3_SECRET_ACCESS_KEY: '******'
  DISCOURSE_S3_CDN_URL: 'https://******3.c******a.com'
  DISCOURSE_S3_BUCKET: c******a
  DISCOURSE_S3_BACKUP_BUCKET: 'c******a/backup'
  DISCOURSE_S3_UPLOAD_BUCKET: 'c******a'
  DISCOURSE_BACKUP_LOCATION: s3

Stacktrace:

Gzipping archive, this may take a while...
Uploading archive...
EXCEPTION: failed to abort multipart upload: SSL_read: unexpected eof while reading. Multipart upload failed: Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null; Checksum Type mismatch occurred, expected checksum type: CRC32, actual checksum type: null
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:103:in 'Aws::S3::MultipartFileUploader#abort_upload'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:86:in 'Aws::S3::MultipartFileUploader#upload_parts'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/multipart_file_uploader.rb:59:in 'Aws::S3::MultipartFileUploader#upload'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/file_uploader.rb:42:in 'block in Aws::S3::FileUploader#upload'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.227.0/lib/aws-sdk-core/plugins/user_agent.rb:90:in 'Aws::Plugins::UserAgent.metric'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/file_uploader.rb:40:in 'Aws::S3::FileUploader#upload'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/customizations/object.rb:477:in 'block in Aws::S3::Object#upload_file'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-core-3.227.0/lib/aws-sdk-core/plugins/user_agent.rb:90:in 'Aws::Plugins::UserAgent.metric'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/customizations/object.rb:476:in 'Aws::S3::Object#upload_file'
/var/www/discourse/lib/backup_restore/s3_backup_store.rb:48:in 'BackupRestore::S3BackupStore#upload_file'
/var/www/discourse/lib/backup_restore/creator.rb:434:in 'BackupRestore::Creator#upload_archive'
/var/www/discourse/lib/backup_restore/creator.rb:41:in 'BackupRestore::Creator#run'
script/discourse:115:in 'DiscourseCLI#backup'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.4.0/lib/thor/command.rb:28:in 'Thor::Command#run'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.4.0/lib/thor.rb:538:in 'Thor.dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/thor-1.4.0/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start'
script/discourse:397:in '<top (required)>'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in 'Kernel.load'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:59:in 'Bundler::CLI::Exec#kernel_load'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli.rb:452:in 'Bundler::CLI#exec'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/command.rb:28:in 'Bundler::Thor::Command#run'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor.rb:538:in 'Bundler::Thor.dispatch'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli.rb:35:in 'Bundler::CLI.dispatch'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/vendor/thor/lib/thor/base.rb:584:in 'Bundler::Thor::Base::ClassMethods#start'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/cli.rb:29:in 'Bundler::CLI.start'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/exe/bundle:28:in 'block in <top (required)>'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
/usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/exe/bundle:20:in '<top (required)>'
/usr/local/bin/bundle:25:in 'Kernel#load'
/usr/local/bin/bundle:25:in '<main>'
Deleting old backups...
Cleaning stuff up...
Removing archive from local storage...
Removing '.tar' leftovers...
Marking backup as finished...
Notifying 'system' of the end of the backup...
Finished!
[FAILED]

Yeah, my setup doesn’t have the AWS_*_CHECKSUM_CALCULATION configs, which is where your setup seems to be erroring. There’s a thread on that feature not being supported by B2, seems they recently implemented it, but I’m not sure if it actually works.

Ok, that made the trick.

Finished!
[SUCCESS]
Backup done.
Output file is stored on S3