Files
BackupX/docs-site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/notifications.md
Wu Qing bc3d03de7e 文档: 新增 Docusaurus 官网与双语文档,README 切换为英文默认 (#39)
- 新建 docs-site/ Docusaurus 项目,支持 en + zh-Hans 双语
- 从 README 迁移内容为独立文档页面:
  - Getting Started(安装、快速开始)
  - Deployment(Docker、裸机、Nginx、配置参考)
  - Features(备份类型、存储后端、SAP HANA、多节点集群、通知)
  - Reference(API、CLI)
  - Development(开发、贡献)
- 自定义 BackupX 主题色、logo、落地页组件
- 新增 .github/workflows/docs.yml,Actions 自动构建并发布到 GitHub Pages
- README.md 切换为英文,中文版挪到 README.zh-CN.md,两者均精简为导航型
- 配置站点 URL:https://awuqing.github.io/BackupX/
2026-04-17 13:19:41 +08:00

50 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
sidebar_position: 5
title: 通知
description: 备份成功或失败时通过邮件、Webhook、Telegram 推送通知。
---
# 通知
BackupX 支持三种通知渠道,可为每个渠道单独配置成功/失败事件是否推送。
## 邮件SMTP
| 字段 | 说明 |
|------|------|
| SMTP 主机 / 端口 | 如 `smtp.gmail.com:587` |
| 用户名 / 密码 | 建议使用专用应用密码 |
| 发件人地址 | 邮件 `From:` 头 |
| 收件人列表 | 英文逗号分隔 |
| 使用 TLS / StartTLS | 按 SMTP 提供方要求选择 |
## Webhook
向任意 URL 发送 JSON POST请求体结构
```json
{
"event": "backup_result",
"task": {"id": 1, "name": "web-files", "type": "file"},
"record": {"id": 42, "status": "success", "fileSize": 1048576, "durationSeconds": 12},
"error": ""
}
```
适合自定义场景Slack incoming webhook、PagerDuty、自建 API 等。
## Telegram
| 字段 | 说明 |
|------|------|
| Bot Token | 在 [@BotFather](https://t.me/BotFather) 创建 |
| Chat ID | 数字型,可通过 `/start` 后调 Bot 的 `getUpdates` 获取 |
## 事件规则
每个通知配置可以指定触发范围:
- **仅成功** — 正常运行时静默
- **仅失败** — 适合高噪敏感通道
- **全部** — 初始化配置时用于验证链路