You inherit an Enhance cluster with three app servers and a couple hundred customer websites. The previous operator “set up backups” — there’s an S3 bucket named enhance-backups-prod, the Enhance UI says “Last backup: 2 hours ago,” and that’s where their work ended. Then a Friday night happens: an app server’s OS disk corrupts, you reach for the runbook, and you discover that nobody has ever restored a backup from this bucket, nobody documented which region the bucket lives in, and the “last backup 2 hours ago” was for a single customer’s website — not the server, not the database, not the panel configuration. Enhance backups work, but only if you actually planned the restore side of the equation.
What’s happening
Enhance has two backup layers that need separate operational discipline:
- Website backups — per-site tarballs (files + database + mailboxes) driven by Enhance’s “Backup Plan” feature. Each plan targets one or more destinations (S3, B2, local, SFTP) on a schedule, with retention rules. Visible in the orchestrator UI under Backups → Plans.
- System backups — the panel itself: orchestrator config, app server config, the panel database, license file, custom scripts. Not handled by Backup Plans; you have to script these yourself or use snapshot-level backups from your cloud provider.
The “DR plan” most operators have is “Backup Plans hit an S3 bucket and we hope for the best.” The actual DR plan needs four things on top of that: the bucket lives in a different region than the cluster, you have a tested runbook to spin a replacement orchestrator from the system backup, you do a real restore of at least one website tarball every quarter, and the credentials that wrote the backups are not the credentials that can delete them.
How to verify
List the backup plans currently configured:
TOKEN=$(vault kv get -field=value secret/enhance/admin/current)
ORCH="https://panel.example.com"
curl -sH "Authorization: Bearer $TOKEN" "$ORCH/api/backup-plans" | \
jq '.backup_plans[] | {name, destinations: .destinations[].type, schedule: .schedule_cron, retention_days: .retention_days, scope: .scope}'
List backup destinations and which credentials they use:
curl -sH "Authorization: Bearer $TOKEN" "$ORCH/api/backup-destinations" | \
jq '.destinations[] | {name, type, endpoint: .config.endpoint, region: .config.region}'
Pick one of the destinations and inspect the bucket directly with the AWS CLI (or rclone) to confirm objects are actually arriving and not just queued:
aws --endpoint-url https://s3.eu-west-1.example.com s3 ls \
s3://enhance-backups-prod/websites/ --recursive | head -20
aws --endpoint-url https://s3.eu-west-1.example.com s3 ls \
s3://enhance-backups-prod/ --recursive --summarize | tail -5
Confirm the bucket region is different from where your cluster lives. If both are in eu-west-1, you have replication but not cross-region DR — a regional outage takes out the panel and the backup simultaneously.
Check when the most recent backup of a specific site actually landed:
SITE_ID="site-abc123"
curl -sH "Authorization: Bearer $TOKEN" \
"$ORCH/api/websites/${SITE_ID}/backups" | \
jq '.backups[] | {created_at, size_mb, destination, state}'
state: completed is the only one that counts. state: in_progress or state: failed does not protect you.
Confirm system-level backups exist somewhere — these are the ones Enhance does not handle for you:
ls -la /var/backups/enhance-system/ 2>/dev/null
# Should contain at least: orchestrator-db-YYYY-MM-DD.sql.gz, /etc/enhance archive, license file
If that directory is empty, the panel itself is unrecoverable from backup. The customer websites might be safe, but the orchestrator that knows about them is not.
The fix
Two pieces — backup plan policy for websites, and a system-level backup script for the panel itself.
Backup plan policy. Create a multi-destination plan that hits a primary off-region bucket plus a second provider for tail risk:
TOKEN=$(vault kv get -field=value secret/enhance/admin/current)
ORCH="https://panel.example.com"
# Destination 1 — primary off-region bucket (write-only credentials)
curl -sH "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
"$ORCH/api/backup-destinations" \
-d '{
"name": "off-region-primary",
"type": "s3",
"config": {
"endpoint": "https://s3.us-east-1.example.com",
"region": "us-east-1",
"bucket": "enhance-backups-prod-use1",
"access_key": "AKIA_WRITE_ONLY_KEY",
"secret_key": "SECRET_KEY_HERE",
"server_side_encryption": "AES256",
"storage_class": "STANDARD_IA"
}
}'
# Destination 2 — second provider for tail risk (different cloud, different region)
curl -sH "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
"$ORCH/api/backup-destinations" \
-d '{
"name": "tail-risk-b2",
"type": "b2",
"config": {
"key_id": "B2_KEYID",
"application_key": "B2_APPKEY",
"bucket": "enhance-backups-tail",
"encryption": "server-side"
}
}'
# Plan — nightly full, 30d retention on primary, 90d on tail
curl -sH "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
"$ORCH/api/backup-plans" \
-d '{
"name": "all-sites-nightly",
"scope": "all_websites",
"schedule_cron": "30 2 * * *",
"include": ["files", "databases", "mailboxes"],
"destinations": [
{"name": "off-region-primary", "retention_days": 30},
{"name": "tail-risk-b2", "retention_days": 90}
]
}'
The credential set for off-region-primary should be a write-only S3 IAM policy — PutObject and GetObject only, never DeleteObject or DeleteBucket. A separate retention job (cron on a different host, with a different credential set that has DeleteObject) does the pruning. This is the only thing that protects you from ransomware on the panel — if an attacker steals the Enhance backup credentials and runs delete-object, the write-only policy refuses.
The pruning script — runs daily on a different host, separate credentials:
#!/usr/bin/env bash
# /opt/backup-prune/enhance-retention.sh
# Runs on a DIFFERENT host than the panel, with a DIFFERENT credential set
set -euo pipefail
PRIMARY_RETAIN_DAYS=30
TAIL_RETAIN_DAYS=90
# Primary
aws --endpoint-url https://s3.us-east-1.example.com s3api list-objects-v2 \
--bucket enhance-backups-prod-use1 \
--query "Contents[?LastModified<='$(date -u -d "${PRIMARY_RETAIN_DAYS} days ago" +%FT%TZ)'].[Key]" \
--output text | while read -r key; do
[[ -z "$key" ]] && continue
echo "delete (primary): $key"
aws --endpoint-url https://s3.us-east-1.example.com s3api delete-object \
--bucket enhance-backups-prod-use1 --key "$key"
done
# Tail-risk B2
rclone delete --min-age "${TAIL_RETAIN_DAYS}d" \
"b2-prune:enhance-backups-tail" --log-level NOTICE
System-level backup script. Captures the panel itself — runs on the orchestrator nightly:
#!/usr/bin/env bash
# /usr/local/bin/enhance-system-backup
set -euo pipefail
DATE=$(date +%Y-%m-%d)
STAGE="/var/backups/enhance-system/${DATE}"
mkdir -p "$STAGE"
echo "==> Orchestrator config"
tar -czf "$STAGE/etc-enhance.tar.gz" /etc/enhance/
echo "==> Panel database (Postgres)"
sudo -u postgres pg_dump --format=custom --compress=9 enhance_panel \
> "$STAGE/enhance-panel-db.dump"
echo "==> License + machine identity"
cp /etc/enhance/license.json "$STAGE/license.json"
cp -a /etc/enhance/machine-id "$STAGE/machine-id"
echo "==> Custom scripts and templates"
tar -czf "$STAGE/custom-scripts.tar.gz" \
/usr/local/enhance/custom/ 2>/dev/null || true
echo "==> Manifest"
cat > "$STAGE/manifest.json" <<EOF
{
"panel_version": "$(curl -s http://localhost/api/version | jq -r .version)",
"captured_at": "$(date -u +%FT%TZ)",
"hostname": "$(hostname -f)",
"app_servers": $(curl -sH "Authorization: Bearer $(cat /etc/enhance/internal-token)" \
http://localhost/api/app-servers | jq '[.app_servers[].hostname]')
}
EOF
echo "==> Replicate off-site"
rclone copy --transfers 4 "$STAGE" \
"s3-system-backup:enhance-system/$(hostname -s)/${DATE}/"
echo "==> Prune local older than 7 days"
find /var/backups/enhance-system -mindepth 1 -maxdepth 1 -type d \
-mtime +7 -exec rm -rf {} \;
echo "==> Done. Off-site at s3-system-backup:enhance-system/$(hostname -s)/${DATE}/"
Cron it:
echo "15 2 * * * root /usr/local/bin/enhance-system-backup >> /var/log/enhance-system-backup.log 2>&1" \
> /etc/cron.d/enhance-system-backup
The restore drill. Once a quarter, on a fixed date, restore one randomly-chosen customer website to a sandbox and click around. The full restore-drill script:
#!/usr/bin/env bash
# /usr/local/bin/enhance-restore-drill
set -euo pipefail
# Pick one site at random from the panel inventory
TOKEN=$(vault kv get -field=value secret/enhance/admin/current)
ORCH="https://panel.example.com"
ALL_SITES=$(curl -sH "Authorization: Bearer $TOKEN" \
"$ORCH/api/websites?limit=2000" | jq -r '.websites[].id')
SITE=$(echo "$ALL_SITES" | shuf -n1)
DOMAIN=$(curl -sH "Authorization: Bearer $TOKEN" "$ORCH/api/websites/$SITE" | \
jq -r '.primary_domain')
echo "==> Restore drill target: site=$SITE domain=$DOMAIN"
# Get the most recent backup
BACKUP_ID=$(curl -sH "Authorization: Bearer $TOKEN" \
"$ORCH/api/websites/$SITE/backups?limit=1&state=completed" | \
jq -r '.backups[0].id')
if [[ -z "$BACKUP_ID" || "$BACKUP_ID" == "null" ]]; then
echo "FAIL: no completed backup for $SITE"
exit 1
fi
# Trigger restore to a sandbox website
SANDBOX_DOMAIN="restore-drill.sandbox.example.com"
SANDBOX_SITE=$(curl -sH "Authorization: Bearer $TOKEN" \
"$ORCH/api/websites?domain=$SANDBOX_DOMAIN" | jq -r '.websites[0].id')
curl -sH "Authorization: Bearer $TOKEN" \
-X POST "$ORCH/api/websites/$SANDBOX_SITE/restore" \
-d "{\"backup_id\":\"$BACKUP_ID\"}"
# Wait for restore to complete (poll)
for i in {1..60}; do
STATE=$(curl -sH "Authorization: Bearer $TOKEN" \
"$ORCH/api/websites/$SANDBOX_SITE" | jq -r '.last_operation.state')
if [[ "$STATE" == "completed" ]]; then break; fi
if [[ "$STATE" == "failed" ]]; then echo "FAIL: restore failed"; exit 1; fi
sleep 10
done
echo "==> Restored. Test the site:"
echo " curl -sk https://$SANDBOX_DOMAIN/ | head -20"
echo " Then log in and click around for 10 minutes."
echo
echo "==> Drill artifact:"
echo " site=$SITE -> sandbox $SANDBOX_SITE"
echo " backup_id=$BACKUP_ID"
echo " timestamp=$(date -u +%FT%TZ)"
Two structural rules: never let the same set of credentials write a backup and prune it — split the write path and the delete path with different IAM roles, ideally on different hosts. And the system-backup script must run on a host that is not one of the app servers — if your orchestrator-only host dies, the script that protects the orchestrator should not have died with it.
Enhance fleets where backups are tested, off-region, cross-provider, and the system-level state is captured outside the panel are part of how we operate the platform under Managed Cloud Ops. Schedule a DR review if your backup story would not survive a full app-server loss.