fairdb-ops-manager
Database operations management for FairDB PostgreSQL clusters
Installation
Open Claude Code and run this command:
/plugin install fairdb-ops-manager@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
What It Does
Comprehensive operations toolkit for managing FairDB managed PostgreSQL infrastructure
A Claude Code plugin that provides guided SOPs, incident response procedures, monitoring tools, and automation scripts for running a production-grade managed PostgreSQL service.
Features
📚 Standard Operating Procedures (SOPs)
Detailed, beginner-friendly guides for:
- SOP-001: VPS Initial Setup & Hardening (60 min)
- System updates and user configuration
- SSH hardening with key authentication
- Firewall (UFW) and Fail2ban setup
- Automatic security updates
- Complete security verification
- SOP-002: PostgreSQL 16 Installation & Configuration (90 min)
- PostgreSQL 16 installation
- SSL/TLS encryption
- Performance tuning for available RAM
- pgstatstatements monitoring
- Health check automation
- SOP-003: Backup System Setup & Verification (120 min)
- pgBackRest configuration with Wasabi S3
- AES-256 encryption
- Automated daily/weekly backups
- Backup restoration testing (critical!)
- Weekly verification automation
🤖 Autonomous Agents
Intelligent assistants that handle complex multi-step operations:
- fairdb-setup-wizard: Complete guided setup from bare VPS to production-ready
- fairdb-incident-responder: Autonomous incident response with diagnosis and recovery
- fairdb-ops-auditor: Compliance auditing with detailed remediation plans
🛠️ Operational Commands
Quick-access commands for daily operations:
/sop-001-vps-setup- VPS hardening guide/sop-002-postgres-install- PostgreSQL setup guide/sop-003-backup-setup- Backup configuration guide/daily-health-check- Morning health check routine/incident-p0-database-down- Database down emergency response/incident-p0-disk-full- Disk space emergency procedures
📊 Shell Scripts (Deploy to VPS)
Production-ready scripts for server deployment:
- pg-health-check.sh - Automated PostgreSQL health monitoring
- backup-status.sh - Visual backup status dashboard
- sop-checklist.sh - Interactive SOP completion verification
How It Works
1. First Time Setup (New VPS)
Use the complete setup wizard for automated guidance:
/agent fairdb-setup-wizard
The wizard will guide you through:
- VPS hardening (SOP-001)
- PostgreSQL installation (SOP-002)
- Backup configuration (SOP-003)
Total time: 3-4 hours
2. Manual Step-by-Step Setup
If you prefer manual control:
/sop-001-vps-setup
/sop-002-postgres-install
/sop-003-backup-setup
3. Deploy Helper Scripts to VPS
Once your VPS is set up, deploy the monitoring scripts:
ssh admin@your-vps-ip -p 2222
sudo mkdir -p /opt/fairdb/scripts
sudo chmod +x /opt/fairdb/scripts/*.sh
crontab -e
FAQ
A: No! The SOPs are designed for beginners. Each command is explained with WHY, not just HOW. The setup wizard provides hand-holding throughout the process.
A: 3-4 hours for complete setup (VPS hardening + PostgreSQL + Backups). You can take breaks between phases.
A: Yes! This plugin is based on production best practices for managed PostgreSQL services. However, always test in a staging environment first.
A: Each SOP has verification checkpoints. If something fails, restore from VPS snapshot and start fresh. The scripts include safety checks to prevent destructive actions.
A: The SOPs use Wasabi (cheaper than AWS S3), but pgBackRest works with any S3-compatible storage. You can modify the configuration for AWS S3, Google Cloud Storage, Azure Blob, etc.
A: Example costs:
- Contabo VPS (8GB RAM, 200GB NVMe): ~$12/month
- Wasabi storage (first 1TB free, then $6.99/TB/month)
- Total: ~$12-20/month for single VPS
A: Yes! Use the commands and agents for each VPS separately. The ops auditor can check compliance across your fleet.
A: This plugin is designed for small-to-medium operations (1-20 VPS instances). For enterprise scale, consider additional monitoring tools (Prometheus, Grafana) and orchestration (Ansible, Terraform).