The 3-2-1 Backup Rule for Home Servers, With a Worked Example

Updated 7 min read By the Self-Hosting HQ Editorial Team
Quick answerThe 3-2-1 rule, as CISA states it, means keeping 3 copies of important files (the original plus 2 backups), on 2 different media types, with 1 copy offsite. On a home server that usually means live data, a local backup on a separate disk or machine, and an encrypted offsite repository made with a tool like restic or Borg. A backup only counts once you've restored from it, so schedule restore tests.

Self-hosting moves your photos, documents and smart-home history from someone else’s data centre onto hardware you own. That also moves responsibility for not losing them onto you. The 3-2-1 backup rule is the simplest well-known way to turn that responsibility into a plan you can check off.

This guide explains the rule as CISA states it, applies it to a typical single-server home lab with a worked example, and gives concrete restic and Borg commands from their official documentation, checked in December 2026 (restic 0.20.0, Borg 1.4.5). It finishes with a restore-testing schedule, because an untested backup is a hope, not a backup.

What the 3-2-1 backup rule actually says

CISA’s paper Data Backup Options summarises the rule in three parts:

  • 3: keep 3 copies of any important file, meaning 1 primary and 2 backups.
  • 2: keep the files on 2 different media types to protect against different types of hazards.
  • 1: store 1 copy offsite, outside your home or business.

Each number protects against a different failure. Three copies means one backup can fail silently without leaving you exposed. Two media types means one class of problem (a batch of drives with the same defect, a single machine’s power supply frying everything attached to it) can’t take out every copy. One offsite copy covers fire, flood and theft, which destroy everything in the building at once.

For home servers, “different media” is usually interpreted practically: separate physical devices that don’t fail together, such as an internal ZFS pool and an external USB disk, or a server and a separate NAS, plus cloud object storage. The point is independence.

What counts as a copy (and what doesn’t)

Many home labs believe they have three copies when they really have one. Use this table to audit yours:

Setup Counts as a separate backup copy? Why
RAID 1, RAIDZ or a ZFS mirror No Protects against disk failure only; deletions and corruption hit all disks instantly.
ZFS or Btrfs snapshots on the same pool No (but very useful) Great for undoing mistakes, but they die with the pool.
File sync (Nextcloud, Syncthing, Dropbox) No Changes and deletions propagate; versioning varies.
restic or Borg repository on a separate disk or machine Yes Independent device, versioned history, encrypted.
Proxmox VM backups on a different storage Yes, for the VM Proxmox’s backup tool or Proxmox Backup Server captures full guests.
Encrypted repository in cloud storage or at a relative’s house Yes, and offsite Survives events that destroy your home hardware.

Snapshots and RAID still belong in your design: they make recovery from small mistakes fast. They just don’t satisfy the rule.

Worked example: one home server, three copies

Consider a typical setup: a mini PC running Docker, with about 500 GB of irreplaceable data (a photo library, Nextcloud files, Home Assistant backups, Docker Compose files and nightly database dumps). Here’s how it maps onto 3-2-1:

Copy Where Medium Tool Schedule
1 (primary) Server’s data pool Internal SSD/HDD — Live
2 (local backup) Separate machine or USB disk Different device restic or Borg Nightly
3 (offsite) S3-compatible bucket, SFTP host at a relative’s, or a second rest-server Remote storage restic or Borg Nightly or weekly

Check it against the rule: three copies (primary plus two backups), on at least two independent devices, with one copy offsite. The rule is satisfied, and only one of the three copies depends on a cloud provider.

Prepare consistent data first

Backing up a live database’s files can capture them mid-write. Dump databases to a file before the backup runs, or use the database’s own backup command. restic can also read a dump directly from a command; its documentation shows restic -r /srv/restic-repo backup --stdin-from-command -- mysqldump --host example mydb as an example. For containerized apps, stopping the stack briefly before the backup is the simplest way to get a consistent copy.

Local backup with restic

Create a repository on the backup disk. restic asks for a password and encrypts everything with it:

restic init --repo /mnt/backupdisk/restic-repo
restic -r /mnt/backupdisk/restic-repo --verbose backup /srv/appdata /srv/photos
restic -r /mnt/backupdisk/restic-repo snapshots

To run unattended, restic reads the repository and password from the RESTIC_REPOSITORY and RESTIC_PASSWORD_FILE environment variables, so a nightly systemd timer or cron job doesn’t need the password on the command line. Keep the password file readable only by root.

Store the password twicerestic's documentation is blunt: losing your password means your data is irrecoverably lost. Keep it in a password manager and on paper somewhere that isn't next to the server.

Offsite copy

You have two clean options. The first is to run a second, independent backup straight to the remote repository, for example over SFTP (restic -r sftp:user@host:/srv/restic-repo init) or to S3-compatible storage. The second is restic copy, which copies snapshots from one repository to another. restic’s docs explain that initialising the destination with init --from-repo ... --copy-chunker-params keeps deduplication efficient between the two.

Borg follows the same pattern. Its quick start shows borg init --encryption=repokey /path/to/repo, then borg create to make each archive, borg prune to apply retention and borg compact to free space. Remote repositories are given as user@hostname:/path/to/repo over SSH.

Retention

Keep history long enough to notice a problem before the clean versions expire. A common pattern with restic:

restic -r /mnt/backupdisk/restic-repo forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune

That keeps up to 7 daily, 4 weekly and 12 monthly snapshots, so at most 23 restore points cover about a year. Note a subtlety from restic’s documentation: --keep-daily 7 keeps the last 7 days that had a snapshot, not the last 7 calendar days. Run with --dry-run first to see what would be removed.

Protecting backups from ransomware and mistakes

If the server that’s being backed up can also delete its backups, so can anything that compromises that server. Reduce that risk:

  1. Use append-only targets. restic’s rest-server has an --append-only flag, and Borg supports an append-only repository mode, so clients can add backups but not erase existing ones. Run pruning from a separate, trusted machine.
  2. Keep one copy offline or out of reach. A USB disk that’s disconnected between runs, or cloud storage with object versioning or retention locks, can’t be wiped by a compromised server.
  3. Separate credentials. The offsite account should not use the same password or keys as anything on the server.
  4. Encrypt. CISA’s paper advises encrypting sensitive data stored in the cloud. restic and Borg encrypt client-side, so the storage provider only sees ciphertext.

Restore testing: a schedule that proves backups work

Backups fail quietly: an excluded folder, an expired cloud credential, a full disk. The only proof is a restore. A practical schedule for a home lab:

How often Test Command or action
After every backup Job succeeded Check the exit status and alert on failure
Weekly Repository structure restic check
Monthly Sample of actual data restic check --read-data-subset=5% (rotate through the repo over time)
Monthly Restore a few files restic restore latest --target /tmp/restore --include /srv/photos/2026 and open them
Quarterly Restore one full app Restore an app’s data and Compose file onto a test VM and start it
Yearly Disaster drill From a clean machine, using only the offsite copy and your stored password

restic’s documentation explains that a plain check verifies the repository structure, while --read-data downloads and verifies every pack file; --read-data-subset lets you verify a fraction (for example 1/5, a percentage or a size such as 10G) so large offsite repositories can be checked over several runs. Borg offers borg check for the same purpose.

The yearly drill is the one people skip and the one that matters most. It catches the failure that matters in a real disaster: the password, the cloud login and the restore instructions all lived on the server that just burned down.

A 3-2-1 checklist for your home server

  • List what's irreplaceable (photos, documents, configs, databases) and where it lives.
  • Dump databases or stop apps before backups so files are consistent.
  • Copy 2: nightly encrypted backup to a separate device.
  • Copy 3: encrypted offsite backup, ideally append-only or versioned.
  • Retention long enough to notice silent damage (months, not days).
  • Repository passwords and offsite credentials stored outside the server.
  • Failure alerts for backup jobs, plus the restore-test schedule above on your calendar.

If you run Proxmox, add guest-level backups too: the Proxmox wiki describes its integrated backup tool, which can write to file-level storage or to a Proxmox Backup Server with de-duplicated chunks. For choosing between a dedicated storage box and a general server, see home server vs NAS, and if you’re setting up the storage side now, our TrueNAS setup guide covers pools, snapshots and replication. Photo libraries deserve special care; Nextcloud vs Immich explains where each keeps its data. More guides are in the storage section.

Frequently asked questions

Is RAID or a ZFS mirror a backup?

No. A mirror protects against a disk failing, but it faithfully copies deletions, corruption and ransomware encryption to every disk at once. It counts as one copy of your data, not two.

Does cloud sync like Nextcloud or Dropbox count as a backup?

Not on its own. Sync propagates deletions and changes to every device. A backup keeps older versions you can go back to. Some sync services keep version history, but check how long and whether it covers deleted files.

Should I use restic or Borg?

Both encrypt and deduplicate. restic supports many destinations directly, including S3-compatible storage, SFTP and a REST server. Borg works with local paths and SSH destinations and has mature append-only and compression options. Pick the one whose destinations match your offsite plan.

What happens if I lose the restic repository password?

The data is gone. restic's documentation states that losing your password means your data is irrecoverably lost, so store it in a password manager and in a second safe place.

Sources

  1. Data Backup Options: CISA (US-CERT)
  2. Preparing a new repository: restic documentation
  3. Backing up: restic documentation
  4. Working with repositories: restic documentation
  5. Restoring from backup: restic documentation
  6. Removing backup snapshots: restic documentation
  7. Quick Start: BorgBackup documentation
  8. Additional Notes: BorgBackup documentation
  9. rest-server (GitHub repository): restic project
  10. Backup and Restore: Proxmox VE Wiki
Written and maintained by the Self-Hosting HQ Editorial Team

We research every guide from manufacturer documentation, government and standards bodies, and other primary sources, which are cited at the end of each article. We do not accept payment for coverage. Read our editorial policy to see how articles are researched, fact-checked and updated, or tell us if something is out of date.