Runbook Template
Overview
Purpose: What this runbook accomplishes.
When to use: Circumstances requiring this procedure.
Time estimate: X minutes (uninterrupted)
Risk level: Low / Medium / High
Pre-Flight Checklist
| Complete ALL checks before proceeding. |
-
Verify you have root/sudo access
-
Backup critical data:
rsync -av /path/to/data /backup/location/ -
Confirm maintenance window (if applicable)
-
Notify stakeholders (if applicable)
-
Check current state:
# Capture current state for rollback reference
systemctl status service-name
cat /etc/config/file > /tmp/config-backup-$(date +%F)
Variables
Set these before running commands:
# REQUIRED - Set these values
export TARGET_HOST="hostname"
export SERVICE_NAME="service"
export BACKUP_PATH="/backup/$(date +%F)"
# Verify
echo "Target: $TARGET_HOST, Service: $SERVICE_NAME, Backup: $BACKUP_PATH"
Execution
Step 1: [First Action]
Purpose: Why this step is necessary.
# Command with explanation
sudo systemctl stop $SERVICE_NAME
Expected output:
[expected output here]
If this fails: Jump to Rollback Procedure.