# 云存储备份上传失败时通知

**URL:** <https://meta.discourse.org/t/notification-when-uploading-backup-to-cloud-storage-fails/269994>\
**Category:** Feature\
**Tags:** backups, s3\
**Created:** [2023年六月29日 07:39 UTC](https://meta.discourse.org/t/notification-when-uploading-backup-to-cloud-storage-fails/269994 "2023-06-29T07:39:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markschmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markschmucker/32/141599_2.png) [@markschmucker](https://meta.discourse.org/u/markschmucker)\
**Post date:** [2023年六月29日 07:39 UTC](https://meta.discourse.org/t/notification-when-uploading-backup-to-cloud-storage-fails/269994/1 "2023-06-29T07:39:09Z")

</div>

如以下链接所述，如果 Discourse 配置为将备份上传到云存储，则上传可能会悄无声息地失败，将 tar 文件留在本地磁盘上。几次此类失败后，论坛将因磁盘空间不足而崩溃。请求在上传失败时收到通知，就像备份失败时一样。

[配置 S3 兼容对象存储提供商以下载 - 文档 / sysadmin - Discourse Meta](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/420)

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2023年六月29日 07:56 UTC](https://meta.discourse.org/t/notification-when-uploading-backup-to-cloud-storage-fails/269994/2 "2023-06-29T07:56:34Z")

</div>

我在论坛上也遇到过几次这个问题。

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2023年六月29日 12:46 UTC](https://meta.discourse.org/t/notification-when-uploading-backup-to-cloud-storage-fails/269994/3 "2023-06-29T12:46:23Z")

</div>

备份过程本应在完成时进行清理，即使发生故障也是如此。但操作系统有可能在备份过程能够进行清理之前就将其终止。我目前能想到的原因包括：

- 主机重启（可能是因为操作系统升级）
- Docker 容器重启（可能是因为 Docker 守护进程已更新或崩溃）
- 系统内存不足并终止了进程
- 进程因任何原因崩溃，无法正常退出

我猜这里的特性请求是：一个后台作业应该检查备份是否被中止。在这种情况下，它应该清理备份的临时文件并向管理员发送警告。
