mutschler.dev

12 My backup strategy

Chapter 12: My backup strategy

A map of my backups as of November 2026: a Dell Wyse 5070 home server with hourly BTRFS snapshots, two USB backup disks and an off-site mirror on a Hetzner Storage Box, Home Assistant backups that travel the same way, and Time Machine on my Macs. It explains which copies exist, where they live, when they run, how I notice failures and where I restore from, with links to the guides that set up each part.
First published
Last revised
Reading time
21 minutes
Sections of this chapter

Overview

Wooden letter tiles spelling BACKUP in front of hard disk drives
Image credit: Tim Reckmann on ccnull.de

This post is a map of my backups, for me and for my relatives. It says which copies of my data exist, where they live, when they are made, how I notice that something failed, and where I would restore from. It does not repeat commands. Each part links to the guide that sets it up, and the scripts and configuration files are in my scripts repository.

A lot has changed since the 2022 edition of this post. I no longer use the Lenovo server, a ThinkSystem SR655 that I ran for my research. The Dell and Honor laptops from back then are no longer part of my backups. Nextcloud ran on my Mac mini for a while before it moved to the Wyse. Since November 2026, a Dell Wyse 5070 Thin Client at home is my server: it runs Nextcloud All-in-One (AIO), collects the backups of my Raspberry Pi with Home Assistant, and protects both with snapshots, two USB disks and an off-site mirror. My Macs keep using Time Machine.

The principles stayed the same:

  • Sync is not a backup. Nextcloud spreads a mistake to every device, so the server data needs versioned copies.
  • Go back in time. Damaged files or malware can stay unnoticed for a while, so I keep hourly, daily, weekly and monthly versions.
  • Several copies in several places: on the server, on separate disks, and outside the house.
  • Encryption at rest. Every backup disk and the off-site copy are encrypted, so a lost, stolen or returned disk exposes nothing.
  • Every backup job I wrote reports to healthchecks.io. A missing ping is as loud as a failed one. AIO’s own backup is the exception: it reports only failures, as a Nextcloud notification. modCraft’s daily statistics export has no check either.
  • Everything is written down. The guides on this site and the public scripts repository are what I would rebuild from.

This is how the pieces fit together:

Map of my backups in November 2026Three locations drawn as frames; disks and storage are drawn as tinted cylinders, machines as plain boxes. Home, left column from top to bottom: the Raspberry Pi with Home Assistant OS sends a daily encrypted backup at about 05:00 over SMB to the SSD of the Dell Wyse 5070 to its right. Below the Pi, the Mac mini does not sync to Nextcloud; it runs Gitea, which mirrors my repositories on GitHub, GitLab and Dynare's GitLab, and modCraft, and it keeps my Photos library; it backs up hourly with Time Machine to a Samsung T7 2 TB below it, which therefore also holds the Photos library and the nightly Gitea backups. On the Wyse, the encrypted system SSD holds the Nextcloud data, the host and the Home Assistant backups, with hourly btrbk snapshots (48 hourly, 7 daily). btrbk sends a copy every day at 01:30 to HDD 1, a 6 TB WD Elements with LUKS2 that keeps 30 daily, 12 weekly and 12 monthly copies. Nextcloud All-in-One makes an encrypted Borg backup every early morning to HDD 2, a 4 TB Toshiba. Below the Wyse, side by side, my wife's MacBook Air and my MacBook Pro sync to Nextcloud over Tailscale: their lines meet and go up into the Wyse's SSD. Each also backs up hourly with Time Machine to the disk below it: the MacBook Air to a Crucial P1 1 TB, the MacBook Pro to a SanDisk 4 TB. All Time Machine disks are encrypted. Two copies leave the house and are highlighted as dashed lines. Hetzner data centre, to the right of the Wyse: every day at 06:30 rsync over SSH mirrors two things to a Storage Box, which takes its own daily snapshots: AIO's Borg repository from HDD 2 and the Home Assistant backups from the SSD. Office, to the right of the MacBook Pro: when the MacBook Pro is docked there, Time Machine backs it up to a LaCie 2 TB.HomeHetzner data centreOfficeRaspberry PiHome Assistant OS,keeps 60 backups itselfHA backup, SMBdaily ~05:00Mac miniGitea mirrors GitHub,GitLab, Dynare's GitLabPhotos library, modCraftno Nextcloud syncTime Machine, hourlySamsung T7 2 TBwith the Photos libraryand the Gitea backupsDell Wyse 5070Nextcloud AIO, Samba share for Home AssistantSystem SSDVerbatim 2 TBLUKS2 + BTRFSNextcloud datahost: @root, @home/srv/ha-backupsbtrbk snapshotsevery hour, keeps48 hourly, 7 dailyHDD 1WD Elements 6 TBLUKS2 + BTRFSkeeps 30 daily,12 weekly,12 monthlyHDD 2Toshiba 4 TBBTRFS, no LUKSAIO's Borgrepository,Borg-encryptedbtrbk senddaily 01:30AIO Borgearly morningHA backupsBorg repositoryrsync over SSHdaily 06:30Storage BoxBorg repositoryand HA backups(a mirror)own daily snapshots,set in the ConsoleMacBook AirM1, my wife's laptopMacBook ProM2 Max, my laptopNextcloud sync over TailscaleTime Machine, hourlyCrucial P1 1 TBexternal SSDTime Machine, hourlySanDisk 4 TBexternal SSDTime Machinewhen dockedLaCie 2 TBTime Machine of theMacBook Pro, dockedcopy at homeoff-site copyTimes are local (Europe/Berlin).Time Machine disks are encrypted.Wyse jobs report to healthchecks.io;AIO reports in Nextcloud.
Where my backups live in November 2026. The highlighted, dashed lines are the copies that leave the house; the plan for the next setup is in section 6.2. Times are local (Europe/Berlin).

1 The machines and their data

MachineWhat it holdsWhere its data goes
Dell Wyse 5070 Thin Client (dell-wyse), homeNextcloud AIO with our files; the Home Assistant backups; the Ubuntu host itselfHourly snapshots on its SSD, daily to HDD 1 and (Nextcloud only) to HDD 2, daily off-site to a Hetzner Storage Box (section 2)
Raspberry Pi 4 Model B (homeassistant), homeHome Assistant OS, including the complete Zigbee network in Zigbee2MQTT’s folderEncrypted daily backups: 60 kept on the Pi, 7 on an SMB share on the Wyse, from where they follow the Wyse’s own backups
MacBook Pro M2 Max (macbook-pro), home and officeMy main work machineTime Machine to a SanDisk Extreme Portable 4 TB at home and a LaCie 2 TB in the office; user files sync to Nextcloud
MacBook Air M1 (macbook-air), homeMy wife’s laptopTime Machine to a Crucial P1 1 TB in a USB-C enclosure; user files sync to Nextcloud
Mac mini M4 Pro (mac-mini), homeResearch workstation; Gitea and my web app modCraft; my Photos library on a separate Samsung T7 1 TBTime Machine to a Samsung T7 2 TB, including the Photos library; no Nextcloud sync
iPhones and iPadsPhotos, messages, app dataiCloud Backup only

The Wyse is the heart of it. Its hardware is a Celeron J4105 with 32 GB RAM, a Verbatim Vi560 2 TB SATA SSD as the system disk (the built-in eMMC stays unused), and two bus-powered USB HDDs for backups (hardware guide). The SSD is a single disk, not redundant storage; the two HDDs and the off-site mirror are what protect it. The SSD is LUKS2-encrypted with the BTRFS pool inside, and I type its passphrase over SSH into the initrd at every boot (section 5.7 of the Wyse guide). The pool is split into subvolumes for the host, my home directory, Docker’s data (AIO’s database and configuration), the Nextcloud data and the Home Assistant backups (section 1).

The Mac mini runs Gitea and my web app modCraft (Mac mini guide). Gitea mirrors my repositories on GitHub, GitLab and Dynare’s GitLab, so it is my backup of them; it used to run on the Lenovo server. Every night, a consistent Gitea backup and an export of modCraft’s statistics go into folders that Time Machine copies (section 10.3 of the Mac mini guide).

2 The copies

These are the copies of the data on the Wyse:

CopyWhereVersionsEncryptedProtects against
Live data, plus Nextcloud’s own trash and file versionsVi560 SSD in the WyseNextcloud’s versions onlyLUKS2Nothing beyond a quick undo in Nextcloud
BTRBK snapshotsSame SSD48 hourly, 7 dailyLUKS2A deleted or overwritten file, a bad change on the host
BTRBK send/receiveHDD 1, WD Elements 6 TB, USB30 daily, 12 weekly, 12 monthlyLUKS2A dead SSD; mistakes noticed weeks or months later
AIO’s Borg backupHDD 2, Toshiba 4 TB, USBAIO’s default: all of the last 7 days, 4 weekly, 6 monthlyBorgA broken Nextcloud installation; the consistent copy to restore the application from
Mirror of the Borg repository and the HA backupsHetzner Storage Box10 daily Storage Box snapshotsBorg, and Home Assistant’s keyFire, theft or a power surge that takes all three disks at home

Some details matter:

  • Snapshots are crash-consistent. They capture each subvolume as after a power cut. The database and the files are snapshotted a moment apart and can disagree slightly, so I restore the Nextcloud application from Borg, not from snapshots (section 7 of the Wyse guide).
  • Borg is consistent. AIO stops the containers while Borg runs (section 10.1). The previews are excluded from it; HDD 1 still has them.
  • HDD 1 holds plain copies of everything, including the host, so it is encrypted like the SSD. A keyfile on the encrypted SSD unlocks it at boot; its own passphrase is in my password manager (section 7.2).
  • HDD 2 is not LUKS-encrypted, because Borg encrypts the repository itself.
  • The two HDDs hang off different internal USB hubs of the Wyse, so one hub reset does not take out both.
  • The off-site copy is a mirror, not a second Borg repository. Nothing writes to it except the nightly rsync. Both of its parts are encrypted before they leave the house: the repository by Borg, the HA backups by Home Assistant. What protects it against a sync that copies damage or deletions are the Storage Box’s own daily snapshots. I manage those only in the Hetzner Console; the Wyse’s SSH key cannot touch them, so even a compromised Wyse cannot delete them (section 7.6).
  • None of these copies is offline. HDD 1 and HDD 2 are always attached, and the Storage Box is always reachable from the Wyse.
  • The host is not in AIO’s backup. It lives in the snapshots and on HDD 1, and almost all of its configuration is in the public scripts repository; the secrets are in my password manager (section 10.2).

Home Assistant writes a full, encrypted backup every day (Step 6 of the Home Assistant guide). It keeps 60 of them on the Pi for quick restores, but those die with its SD card/SSD. It also uploads each backup to an SMB share on the Wyse, which keeps 7. On the Wyse, the share is a subvolume of its own, so the backups are snapshotted hourly, reach HDD 1 with the next nightly send and go off-site with the mirror (section 7.5 of the Wyse guide). Pruned HA backups stay on HDD 1 for months. The encryption key is in the emergency kit in my password manager; without it, none of these copies can be restored.

My Macs back up hourly with Time Machine to encrypted external disks that stay connected at home, and the MacBook Pro has a second one in the office. On the two MacBooks, the Nextcloud desktop client syncs our user files to the Wyse (macOS guide), so they also end up in all five copies above. The Mac mini does not sync to Nextcloud. A few large folders on the Macs, such as ~/Movies, are excluded from Time Machine (macOS guide).

Recovery material lives in my password manager: the LUKS passphrases and header backups, AIO’s passphrase and the Borg password, the Storage Box passwords, the Samba password, the healthchecks.io ping key, the Tailscale OAuth secret and the Home Assistant emergency kit.

3 A day of backups

The Wyse’s timers run in its local time, Europe/Berlin. AIO reads its backup time as UTC, and the Storage Box’s snapshot time is UTC as well. My AIO backup at 04:00 UTC (the guide’s example is 03:00 UTC) therefore starts at 05:00 CET or 06:00 CEST, and the snapshot at 13:00 UTC is taken at 14:00 CET or 15:00 CEST. Home Assistant runs its daily backup at its “System optimal” time, between 04:45 and 05:45.

WhenJobFrom → toReports to healthchecks.io as
Every five minutesUptime ping–dell-wyse-alive
Every minuteHome Assistant heartbeat–Home Assistant heartbeat
HourlyBTRBK snapshotLive subvolumes → snapshots on the SSDdell-wyse-btrbk-snapshot
Daily, 01:30BTRBK send/receiveSnapshots → HDD 1dell-wyse-btrbk-send
Daily, 04:45–05:45Home Assistant backupPi → share on the Wyse, then to HDD 1 with the next night’s senddell-wyse-ha-backup-check at 07:00
Daily, 04:00 UTCAIO’s updates, then the Borg backup, then the containers start againNextcloud → HDD 2–
Daily, 06:30Off-site mirror, once AIO’s backup has finishedBorg repository and HA backups → Storage Boxdell-wyse-offsite
Daily, 13:00 UTCStorage Box snapshot, 10 keptInside the Storage Box–
Daily, 02:30Gitea backup on the Mac mini (pg_dump and gitea dump)Gitea → ~/Backups/gitea, then Time Machinemac-mini-gitea-backup
Daily, 03:30modCraft statistics export on the Mac minimodCraft → its backups folder, then Time Machine–
HourlyTime Machine on each MacMac → its Time Machine disk–
WeeklyTRIM of the SSD––
Sundays 11:00, and the 15th at 11:00SMART short and long self-testsVi560 and both HDDsdell-wyse-smartd, failures only
Monthly, on the 1st at 10:00BTRFS scrub and error countersVi560 and both HDDsdell-wyse-scrub

The night looks roughly like this, in winter time (CET). The bars show start times; their lengths are rough guesses and vary from night to night.

gantt
    title One night of backups in CET
    dateFormat HH:mm
    axisFormat %H:%M
    todayMarker off
    section Snapshots
    btrbk snapshot every hour :snap, 00:00, 480m
    section HDD 1
    btrbk send to HDD 1 :send, 01:30, 30m
    section Mac mini
    Gitea backup :gitea, 02:30, 15m
    modCraft statistics export :modcraft, 03:30, 5m
    section Home Assistant
    HA backup to the Wyse :ha, 04:45, 60m
    HA backup check :hacheck, 07:00, 10m
    section Nextcloud
    AIO Borg backup to HDD 2 :borg, 05:00, 90m
    section Off-site
    Mirror to the Storage Box :offsite, 06:30, 45m

A few rules connect these jobs:

  • The hourly snapshot and the daily send share a lock. They wait for each other instead of failing. A long send therefore holds up the hourly snapshots, so those hours get no snapshot, and healthchecks.io reports the snapshot job as overdue until the send is done (section 7.3).
  • The daily send catches up. It sends every daily copy that HDD 1’s retention still needs, including days on which HDD 1 was detached. It carries the first snapshot after midnight; later changes wait for the next night.
  • The off-site mirror waits for AIO. It starts only once AIO’s backup container and Borg’s lock are gone, for up to four hours, and copies new data first and deletions last, so even an interrupted run leaves a usable repository.
  • Nextcloud is offline while AIO’s backup runs. How long depends on how much changed. After an upload of 219 GiB in November 2026, it ran from 05:00 to about 07:25.
  • Persistent timers. Jobs that were due while the Wyse was off run right after the next boot; AIO’s own backup does not, it skips the day.

4 Monitoring

Every dell-wyse-* job pings its own check on healthchecks.io when it succeeds. When it fails, a second unit sends a failure ping with the job’s last 40 log lines. A job that never runs, because the Wyse is off, a disk is missing or a timer stopped, shows up as a missing ping (section 7.1).

CheckPeriod / graceWatches
dell-wyse-alive5 minutes / 1 minuteThe Wyse is up, online and its timers run
dell-wyse-btrbk-snapshot1 hour / 1 hourHourly snapshots; also fails while HDD 1 is missing
dell-wyse-btrbk-send1 day / 6 hoursDaily copy to HDD 1
dell-wyse-ha-backup-check1 day / 2 hoursA Home Assistant backup newer than 26 hours is on the share; also catches a dead Pi or a broken share
dell-wyse-offsite1 day / 6 hoursOff-site mirror; also fails if the Borg repository has not changed in 26 hours
dell-wyse-scrub31 days / 2 daysMonthly scrub of all three disks, plus their error counters
dell-wyse-smartdFailures onlySMART health, error logs, self-tests and temperature of all three disks
Home Assistant heartbeat1 minute / 5 minutesHome Assistant is running (Step 7)

Disk health is covered twice. smartd watches the SSD and both HDDs and runs weekly and monthly self-tests, and the monthly scrub reads every block and checks the BTRFS checksums (section 7.4). A scrub finds errors on single-copy data but cannot repair them; that is what the HDD copies are for.

AIO reports a failed backup as a notification to the Nextcloud administrators, not to healthchecks.io. Home Assistant shows a repair when an upload fails, and macOS warns when Time Machine has not run for days.

Besides the alerts, I look at disk usage, error counters, the latest BTRBK copies and the timers now and then, especially after an import or an update (section 10.4). Before I reboot the Wyse, a small script tells me whether a send, the mirror, a scrub, an HA upload or AIO’s daily run would be cut off (section 11.3). Restore drills are in my calendar (below).

5 Restore paths

What went wrongWhere I restore fromHow
A deleted or overwritten file in NextcloudNextcloud’s trash and versions, then the snapshots on the SSD, then HDD 1Snapshots are read-only folders; copy the file back and let Nextcloud rescan (section 7.3, Getting something back)
A bad update or change on the hostSnapshots, or HDD 1Before risky changes, I stop Nextcloud and take a consistent snapshot by hand (section 10.3)
A broken Nextcloud installationAIO’s Borg repository on HDD 2Path B: reinstall from an AIO backup (section 9.4)
A dead SSDHDD 1 for the host and the HA backups, HDD 2 for Nextcloud, the scripts repository and the password managerRebuild the Wyse with the guide, reuse the HDDs without formatting them (section 7.2.2), then Path B
A dead or damaged HDD 2Storage Box mirrorStop the mirror job, copy the repository back, check it, then continue or restore through Path B (section 7.7)
A Borg repository that is damaged everywhereHDD 1The daily copies of the Nextcloud data still hold every user’s files (section 9.4)
A mirror that copied damageA Storage Box snapshot from before the damageRead it through the main account, never with Restore snapshot in the Console (section 7.7)
The house loses all three disksStorage Box plus password managerCopy the mirror back onto a new disk, then Path B (section 7.7); the host comes from the guide and the scripts repository
A dead SD card/SSD in the Pi, or new hardwareNewest HA backup from the Wyse, or from the Storage BoxFlash HAOS and upload the backup during onboarding, with the emergency kit; takes about 10 minutes (Step 8)
Gitea on the Mac mini~/Backups/gitea, from the Mac or from Time MachineRestore script into a fresh installation (Mac mini guide, section 10.4); the mirrors come back from GitHub, GitLab and Dynare’s GitLab anyway
A lost or broken MacTime Machine, or NextcloudUsually I restore only some folders from Time Machine or sync them from Nextcloud (macOS guide)

A backup counts only once a restore from it has worked. The drills in section 10.5 of the Wyse guide are in my calendar:

  • Quarterly: copy one file back from the newest snapshot and from HDD 1 and compare checksums, run Check backup integrity in AIO, extract one file from the newest Borg archive without AIO, and check in Home Assistant that the newest backup is on the Wyse.
  • Yearly: restore a Home Assistant backup onto a spare SD card/SSD or into a VM, compare the Storage Box mirror with HDD 2 byte for byte and look at the snapshot list, test HDD 1’s passphrase and the SSH key in the initrd, and go through all recovery material.

The Mac mini guide adds a quarterly Gitea restore on my MacBook (section 10.4). All drills, together with monthly checks and quarterly updates, are in a calendar file that you can import, Calendar/backup-drills-and-maintenance.ics in my scripts repository.

6 Weak spots and what comes next

6.1 Weak spots

  • HDD 1 is slow. The WD Elements is a 2.5-inch drive with shingled recording (SMR). After I uploaded 219 GiB to Nextcloud, the next send ran at about 10.6 GB/h and took until shortly before midnight, and the kernel logged hung-task warnings in the meantime. That is a slow disk, not a failing one, but it means I import large data in chunks of a few dozen GB per day. To get a large upload onto HDD 1 sooner, I send the current state by hand (section 11.2). A send that was missed, for example because HDD 1 was detached, I start by hand as well (section 11.1).
  • Off-site holds only Nextcloud and Home Assistant. The host, my home directory on the Wyse and the snapshots exist only on the SSD and HDD 1, both in the house. After a fire, the host comes back from the guide, the scripts repository and the password manager instead.
  • No offline copy. Both HDDs are always attached, and the Storage Box is always online. The Storage Box snapshots are out of reach for the Wyse, but nothing is disconnected.
  • A single skipped AIO backup goes unnoticed. AIO never catches up a missed backup, for example when the Wyse is still locked after a reboot at that minute. AIO cannot report a backup that never started, and the off-site job’s 26-hour check only fires after a second skipped day, so nothing alerts me to a single missed AIO backup.
  • Every boot waits for me. After a power cut, the Wyse starts again but stays locked until I type the passphrase over SSH, and no backup runs until then.
  • One SSD. The Wyse has room for only one SSD, and it is a DRAM-less SATA SSD. On 18 November 2026 it reported three short bursts of checksum errors while a send read from it; a memory test and a scrub found nothing, and I replace it if that happens again.
  • The Mac mini and the MacBook Air have no copy outside the house. Their Time Machine disks are at home; only the MacBook Pro also has a Time Machine disk in the office. The MacBook Air’s user files reach the Storage Box through Nextcloud, but the Mac mini does not sync, so its data, including the Photos library, exists only on the Mac and its Time Machine disk.
  • The backups of Gitea and modCraft sit only at home, on the Mac mini and its Time Machine disk.

6.2 The plan

The following is planned, not done. The Wyse was a good start, but its SMR backup disk is the bottleneck, and a more capable machine is waiting:

  • HP Elite Tower 800 G9 as the main server at home: Ubuntu Server 26.04 with LUKS and BTRFS, Nextcloud AIO, BTRBK, Borg and the SMB share for Home Assistant, on an NVMe SSD of about 2 TB (probably the PM983 from the Lenovo server). Two 3.5-inch 4 TB CMR HDDs from the Lenovo server go into its internal bays as HDD 1 and HDD 2, which fixes the slow USB disk.
  • The Wyse moves to my mom’s apartment with the WD Elements 6 TB as an off-site BTRBK target over Tailscale. It pulls the snapshots from the HP, and on the HP its SSH key is restricted to btrfs send, so a compromised HP cannot delete the off-site copies. The first full copy happens at home; only daily increments go over my mom’s connection. Once this has run reliably for a while, it probably replaces the Hetzner Storage Box. How the Wyse unlocks unattended over there is still open.
  • The Toshiba 4 TB becomes an offline copy in the office, LUKS2-encrypted like HDD 1. A calendar reminder tells me to take it home, run the backup on the HP and take it back.
  • The Raspberry Pi keeps running Home Assistant from its SD card/SSD (Booting from a USB SSD). Once the HP runs, its backups go to the share there.
  • The Macs keep Time Machine and sync their data to Nextcloud on the HP, which puts it into the server’s backup chain. The Mac mini gets a second encrypted Time Machine disk that I keep at work and swap regularly, so the Photos library and the Gitea backups also exist outside the house.

That gives five copies of the server data: the live data with hourly snapshots, HDD 1 and HDD 2 in the HP, the Wyse at my mom’s, and the Toshiba in the office. I will update this post once it is in place.

7 Earlier editions

The 2022 edition of this post described the Lenovo server with hardware RAID and BTRBK, Time Machine to two Samsung T5 SSDs, restic on a Dell XPS, BTRBK on a Dell Precision, and Nextcloud sync for my parents’ Honor laptop. I keep it for reference, and its scripts are in the history of my scripts repository. The BTRBK setup for a Linux laptop with an encrypted backup disk from that time lives on in Steps 4 and 5 of my Fedora 35 guide.

Sections of this chapter

Contents of the handbook