dong3434/dsh-auto-maintenance ↗★ 1
dsh-auto-maintenance
DSH Auto Maintenance System - Diagnosis, Fix, Backup, Monitor in one solution
AI Analysis
核心用途是保障 DSH 运行环境及配置文件的安全与稳定。适合担心配置文件损坏、升级不兼容或希望一键诊断修复启动问题的 DSH 用户。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗痛点 2:配置损坏无感知
配置文件(settings.yaml、.credentials.yaml 等)可能因意外写入、磁盘问题、半截更新而损坏,等你发现时已经晚了,无法启动。
本插件解决方案:自动备份配置(每天 + 变更时),任何损坏都能一键恢复,且损坏发生时立即告警提示。
痛点 3:升级后新旧配置不兼容
新版本 DSH 可能改了配置格式、新增必填字段、废弃旧字段,升级后配置直接失效。
本插件解决方案:配置有效性校验 + 自动迁移助手,识别不兼容项并给出修复建议。
6️⃣ 配置文件监控 👁️
- 实时监控关键配置变更
- 变更前自动快照备份
- 检测非法写入并告警
- 防止配置被意外破坏
8️⃣ 配置迁移助手 🔄
- 备份可跨版本迁移
- 导出 / 导入配置
- 敏感字段(API 密钥)脱敏处理
- 导入前安全校验与回滚
📖 使用方法
命令一览
| 命令 | 说明 |
|---|---|
diagnosis | 运行完整诊断 |
fix | 自动修复问题 |
one-click-fix | 一键诊断+修复 |
backup | 手动备份配置 |
restore | 恢复配置 |
smart-start | 智能启动 DSH |
setup-tasks | 设置自动维护任务 |
check | 快速启动检查 |
monitor | 启动配置监控 |
1. 运行完整诊断
dsh-auto-maintenance diagnosis
2. 自动修复
dsh-auto-maintenance fix
3. 一键修复(诊断 + 修复 + 复诊)
dsh-auto-maintenance one-click-fix
4. 备份配置
dsh-auto-maintenance backup
5. 恢复配置
dsh-auto-maintenance restore
### 4. 备份配置
```bash
dsh-auto-maintenance backup
5. 恢复配置
dsh-auto-maintenance restore
## 🎯 典型使用场景
### 场景 1:升级后 DSH 启动失败 😱
```bash
### 场景 3:配置文件被搞坏了 💥
```bash
## ⚙️ 配置说明
插件配置保存在 `~/.dsh/auto-maintenance/config.yaml`:
```yaml
### Q1: 诊断发现配置不兼容
运行 `dsh-auto-maintenance fix` 自动修复;若涉及新版本字段,运行 `migrate` 命令执行迁移。