discourse/discourse · error · UploadsRestoreError
The current file store (#{store_name}) does not support rest
Error message
The current file store (#{store_name}) does not support restoring uploads. What it means
Error "The current file store (#{store_name}) does not support restoring uploads." thrown in discourse/discourse.
Source
Thrown at lib/backup_restore/uploads_restorer.rb:63
@current_db_name = RailsMultisite::ConnectionManagement.current_db
backup_contains_optimized_images = File.exist?(File.join(@tmp_uploads_path, "optimized"))
remap_uploads
restore_uploads
generate_optimized_images unless backup_contains_optimized_images
rebake_posts_with_uploads
end
protected
def restore_uploads
store = Discourse.store
if !store.respond_to?(:copy_from)
# a FileStore implementation from a plugin might not support this method, so raise a helpful error
store_name = Discourse.store.class.name
raise UploadsRestoreError.new(
"The current file store (#{store_name}) does not support restoring uploads.",
)
end
log "Restoring uploads, this may take a while..."
store.copy_from(@tmp_uploads_path)
end
# Remaps upload URLs depending on old and new configuration.
# URLs of uploads differ a little bit between local uploads and uploads stored on S3.
# Multisites are another reason why URLs can be different.
#
# Examples:
# * regular site, local storage
# /uploads/default/original/1X/63b76551662ccea1a594e161c37dd35188d77657.jpeg
#
# * regular site, S3
# //bucket-name.s3.dualstack.us-west-2.amazonaws.com/original/1X/63b76551662ccea1a594e161c37dd35188d77657.jpegView on GitHub (pinned to 1b2d7253e8)
When it happens
Trigger: Thrown at lib/backup_restore/uploads_restorer.rb:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of discourse/discourse@1b2d7253e8 (2026-08-26).
Data as JSON: /api/errors/b89e5307c5bb36ab.
Report an issue: GitHub.