The backup that succeeded without data
A restic backup reports success even though its source filesystem is missing. Investigate the empty snapshot and prevent false success.

The scenario
A local backup job reports success while the expected data is unavailable. Investigate the source and snapshots, then make the job refuse an unmounted source without breaking a valid backup.
Mission objectives
- Reproduce the successful empty snapshot and inspect its contents.
- Detect the missing source mount before running the backup.
- Verify that an unmounted source fails and a mounted source produces a restorable backup.
Lab README
The backup that succeeded without data
The local job reports a successful restic snapshot, but the expected data is missing. Investigate the source and make the job fail when the source mount is absent. A valid mounted backup must still succeed and be restorable.
Environment
Use a disposable Linux environment with Bash, Python 3, restic and util-linux.
The kernel must allow unprivileged user and mount namespaces. The exercise
creates a local restic repository and synthetic data in .lab-state; do not
put real data there. The repository password is deliberately public and is
not suitable for real backups.
Bind mounts are made only inside a short-lived namespace, not on the host. No systemd units, host mount configuration, monitoring service or cloud resources are modified. The script models the backup step, not a systemd timer or heartbeat monitor. No elevated host privileges are required.
Investigate
./setup.sh
./lab.sh snapshots
./lab.sh contents
./lab.sh inspect
./lab.sh unmounted
Inspect backup.sh. Change that job so it refuses an unmounted source before
creating a snapshot, but still backs up the real synthetic data when mounted:
./lab.sh mounted
./verify.sh
./teardown.sh
Teardown deletes only this lab's .lab-state after checking its ownership
marker. It does not reset edits to backup.sh; re-extract the bundle to start
over.
The opsbreakfix.com runbook and demo video show the same empty-source failure with a systemd service and timer. The video also covers monitoring cases outside this lab.
Get the lab
Download and inspect the installer before running it. It checks the archive's SHA-256 digest and refuses to overwrite an existing lab directory.
curl -fsSLO https://devops.download/labs/dataops-02-restic-empty-backup.sh less dataops-02-restic-empty-backup.sh
bash dataops-02-restic-empty-backup.sh
cd labs/dataops-02-restic-empty-backup
./setup.shWhen you've made your changes, run ./verify.sh. Remove lab resources with ./teardown.sh.
Need a nudge?
Hint #1
A successful restic exit status does not guarantee that the expected source filesystem was present.
Hint #2
Inspect the mount status inside the lab namespace before the backup begins; a real mounted source must still be backed up.
Hint #3 · Related guide on opsbreakfix.com
Solved it?
Explore the related guide on opsbreakfix.com.
Continue to opsbreakfix.com ↗