无法使用 S3 上的图片恢复备份

不幸的是,这不起作用。我有 10 个完整备份,但无法恢复任何一个,它们都给我相同的错误:

正在重新连接到数据库...
正在重新加载站点设置...
正在为非员工用户禁用传出电子邮件...
正在禁用只读模式...
正在清除类别缓存...
正在重新加载翻译...
正在重新映射上传...
正在恢复上传,这可能需要一些时间...
正在为 'default' 迁移上传到 S3...
正在将文件上传到 S3...
 - 列出本地文件
 =\u003e 5 个文件
 - 列出 S3 文件
.. =\u003e 1911 个文件
 - 同步文件到 S3
.....
正在更新数据库中的 URL...
正在删除旧的优化图像...
正在将包含灯箱的所有帖子标记为重新烘焙...
285 篇帖子被标记为重新烘焙
异常:509 个上传(共 1823 个)未迁移到 S3。数据库 'default' 的 S3 迁移失败。
/var/www/discourse/lib/file_store/to_s3_migration.rb:132:in `raise_or_log'
/var/www/discourse/lib/file_store/to_s3_migration.rb:79:in `migration_successful?'
/var/www/discourse/lib/file_store/to_s3_migration.rb:373:in `migrate_to_s3'
/var/www/discourse/lib/file_store/to_s3_migration.rb:66:in `migrate'
/var/www/discourse/lib/file_store/s3_store.rb:328:in `copy_from'
/var/www/discourse/lib/backup_restore/uploads_restorer.rb:62:in `restore_uploads'
/var/www/discourse/lib/backup_restore/uploads_restorer.rb:44:in `restore'
/var/www/discourse/lib/backup_restore/restorer.rb:61:in `run'
script/discourse:149:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
script/discourse:290:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:483:in `exec'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/cli.rb:25:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:48:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.13/exe/bundle:36:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
正在尝试回滚...

为什么会发生这种情况?我看到很多人报告了这个问题,但还没有找到解决方案。备份和恢复是非常基本的需求。

2 个赞

(我正在清理对另一个主题的回复,以便可以清除它们。不清楚您是否已解决此问题,因此我不想删除它。)

您解决此问题了吗?

这与它试图将图像上传到 S3 和/或确保它们都在那里的事实有关,但它们不在。

我认为我看到的一种解决方案是在恢复期间关闭上传到 S3,然后再重新打开。

1 个赞

是的,整个解决方案已在此处发布

2 个赞

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