> For the complete documentation index, see [llms.txt](https://docs.dispel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/data-backup-and-recovery.md).

# 数据备份与恢复

Dispel 在数据存储、保留和恢复方面的方案经过精心设计，旨在提供强大的安全性和运营韧性。我们结合加密存储解决方案、自动化备份机制以及地理分布式冗余，力求保护您的数据免受未授权访问和数据丢失的影响。本说明文档概述了这些系统的工作技术细节、管理它们的政策，以及在需要数据恢复时应遵循的流程。

## 数据位置 <a href="#h_65e00cfeb6" id="h_65e00cfeb6"></a>

Dispel 客户可从以下两个数据驻留位置中选择一个：

| 仪表板类型       | 位置 | 方案       |
| ----------- | -- | -------- |
| Dispel - 美国 | 美国 | SaaS     |
| Dispel - 欧盟 | 欧洲 | SaaS，私有云 |

## 数据备份

<figure><img src="https://1079732812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5T5Fo32wwisEqZbODG7j%2Fuploads%2Fgit-blob-64aef062f19766817be7bdcc6cbf28d5d073c2c0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Dispel 会自动备份所有客户和系统数据，以防范影响整个系统的不可预见事件导致灾难性损失。自动化流程会将所有数据备份到可抵御影响整个可用区事件的存储中。默认情况下，数据至少每 24 小时备份一次。备份存储在加密的数据存储归档中。备份会受到监控并发出告警。

Dispel 管理的所有数据库都通过将快照、基础备份和 WAL 文件持久化到对象存储来提供持续保护。此外，通过获取快照或持久化基础备份和 WAL 文件，并在全新的 Postgres 安装中重放它们，来实现 fork 和 follower 数据库。将这些物理备份存储在高可用对象存储中，也使我们能够在硬件故障、数据损坏或大规模服务中断时恢复整个数据库。默认情况下，Dispel 子处理器对象存储提供可靠的基础设施来存储重要数据，并针对对象 99.999999999% 的持久性进行设计。

### 备份类型

Dispel 会进行完整的数据库备份。提交到数据库的事务会记录为 WAL 文件，这些文件可以在快照或基础备份之上重放，从而提供一种完整重建数据库状态的方法。快照会直接存储在对象存储中。基础备份和 WAL 文件会在 Postgres 一经提供后，通过名为 WAL-E 的应用程序推送到对象存储。

## 数据恢复 <a href="#h_29cc3a5682" id="h_29cc3a5682"></a>

数据库可以从冷状态下的备份恢复，或与现有数据库同步。它们分别称为 *fork* 和 *following* 流程。Dispel 还可以回滚到较早的数据库备份。

在所有情况下，都会创建一个新的数据库实例（N2），将其并行接入现有数据库（N1），然后将其提升为 API 的主数据库。下方流程图展示了一个数据库 fork 数据恢复过程：

<figure><img src="https://1079732812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5T5Fo32wwisEqZbODG7j%2Fuploads%2Fgit-blob-ef090b32a2d4a60e1c730676b42d898dfdfb5665%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### 灾难恢复 / 业务连续性 <a href="#h_2c98034406" id="h_2c98034406"></a>

在发生中断时，我们的平台会自动恢复 Postgres 数据库。Dispel 平台旨在动态地在云中部署应用程序，监控故障，并恢复失败的平台组件，包括客户应用程序和数据库。

## 备份保留限制 <a href="#h_ae062a7b1d" id="h_ae062a7b1d"></a>

生产数据库运行在 Amazon Aurora（RDS）上，并配置了自动备份，采用滚动 30 天保留窗口，提供持续的任意时间点恢复（PITR），可恢复到最近 30 天内的任意一秒。自动备份包括存储在 Amazon S3 中的每日快照和事务日志，全部经过 KMS 加密，访问仅限授权操作人员。日志可保留长达一年或更久，以支持合规、审计和取证调查需求。

## 数据导出 / 归档

客户可请求导出和归档其数据的副本。Dispel 使用原生 `pg_dump` PostgreSQL 工具来创建备份文件，使其能够轻松导出到其他 PostgreSQL 安装中。生成的备份文件使用 `pg_dump`中的自定义格式选项。与纯文本格式相比，自定义格式选项生成的备份文件可以小得多。

## 数据所有权

客户数据归客户所有；Dispel 数据归 Dispel 所有。有关 Dispel 如何处理客户数据的更多信息，请查看我们的 [隐私政策](https://legal.dispel.com/policies/privacy-policy).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/data-backup-and-recovery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
