mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-14 20:08:59 +08:00
- 新建 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/
50 lines
1.3 KiB
Markdown
50 lines
1.3 KiB
Markdown
---
|
|
sidebar_position: 5
|
|
title: Notifications
|
|
description: Email, webhook, and Telegram notifications on backup success or failure.
|
|
---
|
|
|
|
# Notifications
|
|
|
|
BackupX supports three notification channels. Configure per-channel rules for success-only, failure-only, or both.
|
|
|
|
## Email (SMTP)
|
|
|
|
| Field | Notes |
|
|
|-------|-------|
|
|
| SMTP host / port | e.g. `smtp.gmail.com:587` |
|
|
| Username / password | App-specific password recommended |
|
|
| From address | Used in `From:` header |
|
|
| Recipients | Comma-separated list |
|
|
| Use TLS / StartTLS | Match your SMTP provider |
|
|
|
|
## Webhook
|
|
|
|
Send a JSON POST to an arbitrary URL. Body shape:
|
|
|
|
```json
|
|
{
|
|
"event": "backup_result",
|
|
"task": {"id": 1, "name": "web-files", "type": "file"},
|
|
"record": {"id": 42, "status": "success", "fileSize": 1048576, "durationSeconds": 12},
|
|
"error": ""
|
|
}
|
|
```
|
|
|
|
Useful for custom workflows: Slack incoming webhook, PagerDuty, your own API, etc.
|
|
|
|
## Telegram
|
|
|
|
| Field | Notes |
|
|
|-------|-------|
|
|
| Bot token | From [@BotFather](https://t.me/BotFather) |
|
|
| Chat ID | Numeric — obtain via `/start` + bot's `getUpdates` |
|
|
|
|
## Event rules
|
|
|
|
Each notification configuration can be scoped to:
|
|
|
|
- **Success only** — quiet during normal runs, pings on first failure
|
|
- **Failure only** — recommended for loud channels
|
|
- **Both** — useful during initial setup to verify notifications flow
|