Skip to main content

Server and maintenance: read this first

Launching a system is the start of the work, not the end. Servers need patches, backups that really restore, upgrades before a version dies, certificates that renew, disks that do not fill, and old resources switched off. This module is how we do that, for every kind of server we run. Read it before you take over any environment.

The three kinds of server​

KindWho patches the OSWho backs upWhat we still own
Managed (Fargate, RDS, Aurora, ElastiCache)AWSAWS, if we turn it on and set retentionVersions, sizes, backups settings, restore drills, cost
Self-hosted (a VPS, an EC2 box)UsUsEverything: OS, Docker, TLS, disk, backups, monitoring, access
Client on-premiseThe client, unless the contract says usThe clientAdvice, and our application's own settings

Prefer managed. Every self-hosted box is a list of chores someone must remember. Most of our maintenance incidents came from self-hosted boxes.

Words you will meet​

WordPlain meaning
PatchAn update that fixes bugs or security holes, usually small
EOL (end of life)The date a version stops getting security fixes
Backup vs snapshotA backup is any copy you can restore. A snapshot is a point-in-time copy of a disk or database
PITRPoint-in-time recovery: restore a database to any second in the last N days
Restore drillActually restoring a backup somewhere safe, to prove it works
RightsizingChoosing the smallest size that safely does the job
DecommissionArchiving, then switching off and deleting something no longer used

The pages in this module​

PageRead it when
Server inventoryYou start on a project, or create any server
Self-hosted server baselineYou set up a VPS or EC2 box
Patching and upgradesEvery month, and when a version nears end of life
Backups and restoreYou add a database or storage, and every quarter
Disks, logs and certificatesA disk fills, or you set up TLS
Scheduled jobsYou add a cron job or a scheduled task
Cost and clean-upEvery month, and when something is retired
Maintenance calendarAlways: the daily, weekly, monthly and quarterly checklist
Server mistakesYour first week

The daily production check and incident handling are in DevOps. This module is about keeping things healthy between incidents.

Rules​

Rule

Every server is in the inventory with an owner. A server nobody owns is a server nobody patches.

Rule

A backup you have not restored is a hope, not a backup. Restore every backup type at least once a quarter.

Rule

Never build on a production server. Build in CI, ship an image or a bundle, and run it. A build on a small server once used all its memory and locked us out for 25 minutes.

Done when​

  • You know which servers your project has, and which kind each is.
  • You have read the maintenance calendar.