LinuxLXXXIII · Operational DocumentationBuild and recovery
Build and recovery procedures - the operational reference
What you'll learn
- Document the build procedure
- Document the recovery procedure
- Use the documentation during incidents
- Keep the documentation current
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
Build and recovery procedures are the operational reference for bringing a service up and bringing it back. This lesson covers how to write and maintain them.
Build procedure
The build procedure is the steps to bring a service up from nothing:
- Provision infrastructure (VMs, network, storage).
- Install dependencies (packages, libraries).
- Configure the application (config, secrets).
- Deploy the application (artifact, container).
- Verify the service is up (smoke test, health check).
- Document the deployment.
BUILD PROCEDURE: <service>
================================
1. Provision:
- VM: <spec>
- Network: <vlan, IP>
- Storage: <volume>
2. Install:
- apt install <packages>
3. Configure:
- /etc/<service>/<config>: <template>
- secrets: <vault path>
4. Deploy:
- systemctl enable <service>
- systemctl start <service>
5. Verify:
- curl http://<service>/health
- check monitoring
Recovery procedure
The recovery procedure is the steps to bring a service back from a failure:
- Assess the failure (is it the host, the service, or the data?).
- Take the appropriate action (restart, failover, restore).
- Verify recovery.
- Document the incident.
RECOVERY PROCEDURE: <service>
==================================
1. Assess:
- ping <host>
- systemctl status <service>
- journalctl -u <service> -n 50
2. Action:
- If service down: systemctl restart <service>
- If host down: failover to <backup>
- If data lost: restore from backup
3. Verify:
- curl http://<service>/health
- check monitoring
- smoke test
4. Document:
- log incident
- post-mortem
Use during incidents
The build and recovery procedures are the reference during incidents. The on-call follows the procedure to bring the service back.
The discipline:
- Procedures are stored in a known location (wiki, runbook repo).
- They are linked from alerts.
- They are version-controlled.
- They are tested during DR drills.
Keep current
The procedures must be current:
- After any infrastructure change, update the build procedure.
- After any incident, update the recovery procedure.
- Quarterly: review all procedures.
A stale procedure is worse than no procedure. The discipline: keep the procedures current.
Knowledge check
Knowledge check · 3 questions
Q1. A recovery procedure has been in the wiki for two years and has never been executed. What should you assume about it?
Q2. What makes a recovery procedure usable by someone who did not write it? Select all that apply.
Q3. A build procedure that produces a host which passes its own verification can still be wrong, because the verification may only test what the procedure just did.
Passing score: 75%. Answers are checked in this browser.