opendcai/datamind/db-ops-sop
Claude Code and agent skill by opendcai/datamind
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Database operations runbook — backup, recovery, performance tuning, troubleshooting. Use for SQLite / MySQL / PostgreSQL ops questions, slow-query diagnosis, or outage response.
Install
npx vskill@latest install opendcai/datamind/db-ops-sopSKILL.md
The same SKILL.md was published earlier as opendcai/datamind/db-ops-sop.
数据库运维 SOP
适用场景
当用户咨询数据库备份、恢复、性能优化、故障排查等运维相关问题时,参考本指南进行回答。
一、数据库备份
1.1 全量备份
1.2 增量备份
- MySQL: 使用 binlog 进行增量备份
- PostgreSQL: 使用 WAL 归档进行增量备份
- 建议每日全量 + 每小时增量
1.3 备份策略建议
| 频率 | 类型 | 保留时间 | |
|---|---|---|---|
| 每日 | 全量备份 | 30 天 | |
| 每小时 | 增量备份 | 7 天 | |
| 每周 | 异地备份 | 90 天 |
二、数据库恢复
2.1 恢复步骤
- 停止应用服务
- 确认备份文件完整性
- 执行恢复命令
- 验证数据一致性
- 重启应用服务
2.2 恢复命令
三、性能优化
3.1 慢查询排查
- 开启慢查询日志
- 分析 TOP 10 慢查询
- 使用 EXPLAIN 分析执行计划
- 添加必要索引
- 优化 SQL 语句
3.2 常见优化手段
- 索引优化: 为高频查询字段添加索引,避免全表扫描
- 查询优化: 避免 SELECT *,减少子查询,使用 JOIN 替代
- 连接池: 使用连接池管理数据库连接,避免频繁创建/销毁
- 读写分离: 大流量场景下主库写、从库读
- 缓存: 热点数据使用 Redis 缓存
四、故障排查清单
- 检查数据库服务是否运行
- 检查磁盘空间是否充足
- 检查连接数是否达到上限
- 检查慢查询是否阻塞
- 检查主从同步状态
- 检查锁等待情况
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdatamind/skills/db-ops-sop/SKILL.md
Popularity
- Repository stars
- 397
- Repository forks
- 53
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/opendcai/datamind/db-ops-sop)