I tried to migrate my discourse instance to a new server, and restore via UI and CLI fail during restore operation. It has to do with S3 migration.
I also had these settings enabled in rails console
SiteSetting.migrate_to_new_scheme = true Jobs::MigrateUploadScheme.new.execute(nil)
The relevant log from the failure was:
Remapping '//thinnal.s3.dualstack.us-east-1.amazonaws.com/' to '/uploads/default/' incoming_emails=2 optimized_images=3851 post_revisions=86 posts=618 stylesheet_cache=10 topic_links=107 topics=150 uploads=419 user_histories=20 Migrating uploads to S3... Checking if default already migrated... 1971 of 1977 uploads are not migrated to S3. S3 migration failed for db 'default'. 266 posts are not remapped to new S3 upload URL. S3 migration failed for db 'default'. Looking for missing uploads on: default 0 post uploads are missing. No posts require rebaking Migrating uploads to S3 for 'default'... Some uploads were not migrated to the new scheme. Please run these commands in the rails console SiteSetting.migrate_to_new_scheme = true Jobs::MigrateUploadScheme.new.execute(nil) Restore process was cancelled! Trying to rollback... Rolling back... Cleaning stuff up... Dropping function from the discourse_functions schema Removing tmp '/var/www/discourse/tmp/restores/default/2019-09-02-140750' directory... Unpausing sidekiq... Marking restore as finished... Notifying 'system' of the end of the restore... Finished! [FAILED] Restore done.