Skip to main content
RunBook Academy

LinuxXLVII · Backup StrategyConcepts

Backup concepts - what to back up and how

Foundation⏱ ~10 minbash

What you'll learn

  • Distinguish file backup from application backup
  • Distinguish full, incremental, and differential
  • Choose retention policy
  • Distinguish backup from disaster recovery

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

Not yet marked complete on this device.

Backup is the safety net for every other control. Without backups, a disk failure is a service failure. This lesson covers the basics.

What to back up

For every host:

  • System configuration: /etc, /usr/local/etc, anything installed outside the package manager.
  • Application data: databases, document stores, user uploads.
  • Logs and audit: may be required for compliance.
  • Secrets: certificates, keys, passwords (encrypted).

For clusters:

  • Service configuration: same as host.
  • Persistent data: same as host.
  • Cluster state: membership, consensus state.

File backup vs application backup

File backup: copy files. Fast for static data, but inconsistent for databases (data may be mid-write).

Application backup: the application produces a consistent snapshot (e.g. PostgreSQL’s pg_dump or filesystem snapshot with FLUSH). Slower but correct.

For databases, use application backup. For static files, file backup is fine.

Backup types

  • Full: copies everything. Slow, large.
  • Incremental: copies what changed since the last backup - of any kind. Fast, small.
  • Differential: copies what changed since the last full backup. Larger each day, but the restore is always a two-archive operation no matter how many days have passed.

The backup type decides the restore procedure, so read the two together:

  • Weekly full + daily incremental: restore the full, then every incremental in order, up to seven archives. Smallest backups, longest and most fragile restore. Lose or skip one link in the chain and the result is wrong.
  • Weekly full + daily differential: restore the full, then the last differential only. Two archives. Larger backups, much faster and safer restore.

Choose differential when RTO matters more than backup storage.

Retention

How long to keep backups:

  • Operational: 1-7 days. For operator errors (delete the wrong file).
  • Operational recovery: 1-4 weeks. For ransomware or mass corruption.
  • Compliance: 1-7 years. Per regulatory requirement.

Different storage tiers for different retention:

  • Hot (1-7 days): SSD, fast access.
  • Cold (1-12 weeks): HDD, slower.
  • Archive (1-7 years): S3 Glacier, compliance only.

Backup vs disaster recovery

Backup is a copy of data, often on a separate disk or host. DR is the plan for restoring service after a major event (data center loss, ransomware, etc).

Backup is a component of DR, not the whole thing. DR includes:

  • Backups (offsite, immutable).
  • Runbooks for restore.
  • Tested procedures.
  • Communication plan.
  • Cross-team coordination.

Knowledge check

Knowledge check · 6 questions

  1. Q1. What is the difference between file backup and application backup?

  2. Q2. A backup you have not restored is still a backup.

  3. Q3. Which of the following are valid backup types? Select all that apply.

  4. Q4. The schedule is a Sunday full plus a daily incremental. A restore is needed on Saturday evening. Which archives must be applied?

  5. Q5. A restore finished with exit status 0, the directory is populated and the service started. What still needs checking before the incident is closed?

  6. Q6. Differential archives grow larger every day since the last full, and that is exactly what makes the restore fast.

Passing score: 75%. Answers are checked in this browser.