Emergency Procedures

Critical incident response & contact information
Status Live
Updated

← Back to Home


Critical Emergency Contact

Database Down? Data Loss? Security Breach?

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PRIMARY CONTACT (Jeremy Longshore)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Email:    jeremy@intentsolutions.io
Response: 4-hour SLA (business hours), typically 30-min
          7 days a week, including holidays
          Critical outages: IMMEDIATE (automated alerts 24/7)

EMERGENCY BACKUP OPERATOR (If no response >24 hours)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Activated automatically if primary contact unavailable
You will receive notification if EBO activates
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Severity Levels

Level Definition Examples Response Time
P0 - CRITICAL Service down, data loss Database offline, data breach, backup failure causing data loss 30 minutes
P1 - HIGH Degraded service Slow queries, disk space >90%, backup failure (data safe) 2 hours
P2 - MEDIUM Non-critical issue Configuration question, performance tuning request 4 hours
P3 - LOW General inquiry Feature request, documentation question Next business day

Emergency Scenarios

Scenario 1: My Database is Down (P0)

Immediate Actions You Can Take

1. Check your connection string
   - Verify host, port, username, password
   - Test: psql "postgresql://user:pass@host:5432/db"

2. Check your application logs
   - Look for connection errors
   - Note exact error message

3. Verify our status page
   - Visit: https://status.costplusdb.dev
   - Check if system-wide outage

Contact Us

Email: jeremy@intentsolutions.io

Subject: "P0 CRITICAL - Database Down - [Your Company Name]"

Include:

What We'll Do

  1. 0-5 min: Acknowledge your email, confirm we're investigating
  2. 5-15 min: Diagnose issue (check PostgreSQL status, disk space, logs)
  3. 15-30 min: Resolve issue (restart service, restore from backup, fix configuration)
  4. 30 min: Send resolution email with root cause analysis

Expected Resolution Time: 30 minutes or less (99% of cases)

Scenario 2: Suspected Data Breach (P0)

Signs of a Security Incident

Immediate Actions

1. DO NOT delete anything (preserve evidence)
2. Document what you observed (screenshots, log excerpts)
3. Change your database password immediately
4. Disconnect affected applications if possible

Contact Us Immediately

Email: jeremy@intentsolutions.io

Subject: "P0 SECURITY - Suspected Data Breach - [Your Company Name]"

Include:

What We'll Do

  1. 0-15 min: Isolate your database (block all connections except yours)
  2. 15-30 min: Forensic analysis (review access logs, identify intrusion vector)
  3. 30-60 min: Secure system (rotate credentials, patch vulnerability)
  4. 1-2 hours: Restore from pre-breach backup if needed
  5. 24 hours: Full incident report with timeline and recommendations

Your Responsibilities (GDPR/Privacy Laws):

Scenario 3: Slow Performance / Queries Timing Out (P1)

Quick Diagnostics You Can Run

-- Check active connections
SELECT count(*) FROM pg_stat_activity;

-- Check for long-running queries
SELECT pid, now() - query_start AS duration, query
FROM pg_stat_activity
WHERE state = 'active'
ORDER BY duration DESC;

-- Check database size
SELECT pg_size_pretty(pg_database_size(current_database()));

Contact Us

Email: jeremy@intentsolutions.io

Subject: "P1 - Performance Issue - [Your Company Name]"

Include:

What We'll Do

  1. Review slow query log
  2. Check for missing indexes
  3. Analyze connection pool saturation
  4. Review disk I/O and memory usage
  5. Provide optimization recommendations

Expected Resolution Time: 2-4 hours

Scenario 4: Need to Restore from Backup (P0)

Backup Restoration Scenarios

Contact Us

Email: jeremy@intentsolutions.io

Subject: "P0 - Backup Restoration Needed - [Your Company Name]"

Include:

What We'll Do

  1. Option A - Point-in-Time Recovery (7 days):
    • Restore database to exact timestamp you specify
    • Downtime: 30-60 minutes depending on database size
    • Available for: Last 7 days
  2. Option B - Full Backup Restoration:
    • Restore from daily backup (2am UTC snapshot)
    • Downtime: 30-90 minutes
    • Available for: Last 7 days (Shared/Dedicated), Last 30 days (Pro/Enterprise)
  3. Option C - Table-Level Export (if available):
    • We restore to temporary database, you export specific table
    • Zero downtime for your production database
    • You merge data manually

Backup Schedule:


Emergency Backup Operator System

What happens if primary operator (Jeremy) is unavailable?

Dead Man's Switch

We use open source monitoring tools to ensure continuity:

EBO Emergency Access

NORMAL OPERATIONS (Read-Only)
├─ EBO can monitor infrastructure health
├─ EBO can view backup status
├─ EBO can see alert dashboards
└─ EBO CANNOT access customer data or make changes

EMERGENCY MODE (Dead Man's Switch Activated)
├─ EBO receives full credentials from secure vault
├─ EBO can restart databases, restore from backups
├─ EBO can respond to security incidents
├─ EBO notifies customers of incident and status
└─ All EBO actions logged and auditable

Your Protections

Full Details: Transparency Hub → Emergency Procedures


Open Source Emergency Tools

CostPlusDB uses industry-standard, open source tools for emergency management:

Tool Purpose Why We Use It
Healthchecks.io Dead man's switch / cron monitoring Open source, self-hosted, 10k+ users. Free alternative to Dead Man's Snitch.
Uptime Kuma Service monitoring dashboard 40k+ GitHub stars, beautiful UI, free alternative to UptimeRobot.
Bitwarden Emergency credential vault Open source, millions of users, emergency access feature built-in.
Grafana OnCall Alert routing & escalation Enterprise-grade alerting, free tier, integrates with everything.
Prometheus Metrics & monitoring Industry standard, CNCF graduated project, used by Google/AWS.

Why Open Source?

Our Emergency Monitoring Stack (Self-Hosted)

1. Healthchecks.io (Dead Man's Switch)

Setup:
- Self-hosted on VPS (https://github.com/healthchecks/healthchecks)
- Cron jobs ping every 12 hours
- If ping missed >24 hours → Alert sent to Jeremy + EBO

Cost: $0 (self-hosted)
Alternative: Dead Man's Snitch ($5/mo)

2. Uptime Kuma (Service Monitoring)

Setup:
- Self-hosted monitoring dashboard
- Checks: PostgreSQL (port 5432), HTTP health endpoint, disk space
- Alert destinations: Email, Slack, webhook

Cost: $0 (self-hosted)
Alternative: Betterstack ($10/mo), UptimeRobot ($7/mo)

3. Bitwarden (Emergency Credentials)

Setup:
- Self-hosted Bitwarden vault (or Bitwarden cloud free tier)
- Stores: VPS passwords, PostgreSQL credentials, API keys
- Emergency Access: EBO can request, auto-granted after 48 hours

Cost: $0 (free tier) or $10/year (premium)
Alternative: 1Password Teams ($20/mo), KeePassXC (offline, free)

4. Grafana + Prometheus (Metrics)

Setup:
- Prometheus scrapes metrics from PostgreSQL (postgres_exporter)
- Grafana visualizes performance, connections, query times
- Alertmanager sends alerts to Grafana OnCall

Cost: $0 (all open source, self-hosted)
Alternative: Datadog ($15/mo), New Relic ($25/mo)

Status Page

Real-time service status: status.costplusdb.dev

Check here first for:

Status page powered by Uptime Kuma (open source)


Incident Post-Mortems

We publish detailed incident reports for all P0/P1 incidents:

Recent Incidents: View all incident reports

No incidents yet (service launched October 2025)


Escalation Path

┌─────────────────────────────────────────────────────────┐
│ CUSTOMER REPORTS ISSUE                                  │
│ Email: jeremy@intentsolutions.io                        │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│ PRIMARY OPERATOR RESPONSE                               │
│ Expected: Typically 30-min (4-hour SLA business hours)  │
│ Critical outages: IMMEDIATE (automated alerts 24/7)     │
│ Action: Acknowledge, diagnose, resolve                  │
└─────────────────────────────────────────────────────────┘
                          ↓
           NO RESPONSE AFTER 30 MINUTES?
                          ↓
┌─────────────────────────────────────────────────────────┐
│ AUTOMATED RETRY                                         │
│ System re-sends alert to primary operator              │
│ Notification sent to EBO (informational only)          │
└─────────────────────────────────────────────────────────┘
                          ↓
           NO RESPONSE AFTER 2 HOURS?
                          ↓
┌─────────────────────────────────────────────────────────┐
│ DEAD MAN'S SWITCH CHECK                                │
│ EBO verifies: When was last check-in?                  │
│ If <24 hours: Wait and monitor                         │
│ If >24 hours: Proceed to emergency activation          │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│ EMERGENCY BACKUP OPERATOR ACTIVATED                     │
│ EBO receives credentials, resolves incident             │
│ Customer notified: "EBO is responding to your issue"    │
└─────────────────────────────────────────────────────────┘

Customer Self-Service Emergency Tools

Emergency Database Export (pg_dump)

If you need to migrate away immediately:

# Export your entire database
pg_dump -h YOUR_HOST -p 5432 -U YOUR_USER -d YOUR_DB \
  -F c -f backup.dump

# Export specific table
pg_dump -h YOUR_HOST -p 5432 -U YOUR_USER -d YOUR_DB \
  -t table_name -F c -f table_backup.dump

# Export as SQL (human-readable)
pg_dump -h YOUR_HOST -p 5432 -U YOUR_USER -d YOUR_DB \
  -f backup.sql

You always have superuser access - You can export your data anytime, no permission needed from us.

Emergency Read-Only Mode (If Database Corrupting)

-- Make database read-only temporarily
ALTER DATABASE your_database_name SET default_transaction_read_only = on;

-- Revert to read-write
ALTER DATABASE your_database_name SET default_transaction_read_only = off;

This prevents further damage while we diagnose the issue.


Legal & Compliance

Data Breach Notification (GDPR/CCPA)

If we detect unauthorized access to customer data:

  1. 0-4 hours: We notify you immediately via email (P0 priority)
  2. Within 24 hours: We provide preliminary incident report
  3. Within 72 hours: We provide full forensic report for your compliance filing

Your Responsibilities:

Business Associate Agreement (BAA) - HIPAA

Not available yet (Month 12+ roadmap)

If you handle healthcare data:


Need Help Now?

Email: jeremy@intentsolutions.io

Subject Line Format:

Expected Response Times: