I could not make sense of this work without research. After three years at CERN, back in Bilbao I decided to work on my own and keep researching and learning. I believe entrepreneurship is the ultimate professional challenge — and, at the same time, an expression of creativity and a claim to freedom.
Zetesis comes from the Greek ζήτησις, inquiry: find the cause before proposing the solution.
Setting up a homelab from scratch: backups and restore
Case studyHomelabBackupsRestic
A backup proves itself when it restores a lost service, not when a copy job finishes. This article explains which data exists in the homelab, how it is copied, and the order in which it is recovered.
The main destination is spinoza, a TrueNAS server in Athens that runs MinIO. MinIO exposes an S3-compatible API for object storage. Remote clusters and servers reach it over private Tailscale connections; some workloads use a gateway named cervantes that only has permission to access the storage service.
Classify the data first
Not everything needs the same backup. Before selecting a tool, decide whether the data is a source, a copy, or temporary state.
PostgreSQL is a source of truth. Losing it means losing information that cannot always be reconstructed.
Persistent volumes contain application files and need copies independent of the cluster.
Typesense is a derived index. Backing it up speeds recovery, but it can also be rebuilt from PostgreSQL.
Redis carries queues and temporary data. It is recreated; restoring stale content may be worse than losing it.
Configuration lives in Git and returns by cloning the repository. Secrets follow the process described in security and operations.
This classification determines restore priority. Sources of truth come back first, persistent data follows, and indexes and temporary state are rebuilt last.
PostgreSQL has physical and logical copies
CloudNativePG, or CNPG, manages PostgreSQL inside Kubernetes. Barman continuously archives WAL—the log where PostgreSQL records every change—and creates periodic base backups in MinIO.
A base backup plus the WAL archive allows point-in-time recovery. Instead of returning only to last night's backup, the database can be rebuilt up to a moment before the incident within the retention window.
Important databases also receive logical dumps through pg_dump. They serve a different purpose: they are more portable and can recover selected objects, although rebuilding a large database this way is usually slower.
Both layers protect against different failures. The physical copy is the primary route for recovering the cluster; the logical dump provides an independent path outside the storage format.
Kubernetes and Docker copy their volumes
K8up runs Restic backups of Kubernetes persistent volumes. Each namespace has its own schedule, destination, and retention policy. Restic encrypts, deduplicates, and checks data before storing it in MinIO.
On pizarro, some volumes use ZFS. Local snapshots provide a quick rollback, and VolSync can replicate them to a Restic repository. A local snapshot protects against an accidental change; a copy at another site protects against losing the node.
VPSs and Docker hosts use tolstoi, the service that schedules Restic for their volumes. cervantes gives that container a private route to MinIO without granting broad access to Athens.
Sharing a destination does not mean sharing repositories. Each service or data group has separate credentials and prefixes, so one workload cannot read or delete another workload's copies.
An index can be restored or rebuilt
Typesense stores its search index on a volume that K8up can copy. Restoring it shortens downtime, but it is not the only option.
If the snapshot is unusable, the indexer can read documents from PostgreSQL and rebuild Typesense. This works because PostgreSQL holds the original data while Typesense holds a representation prepared for search.
Redis follows the opposite approach: it is not backed up. Queues are recreated and required jobs are enqueued again. Choosing what not to copy reduces cost and avoids restoring temporary state that no longer matches the recovered database.
Restore follows a written order
When data is lost, the runbook begins by identifying the incident's scope:
Determine what was lost and stop writes that could make the damage worse.
Create a clean target rather than overwriting the only available copy.
Recover PostgreSQL from Barman to the selected point; use the logical dump if physical recovery does not fit the case.
Restore persistent volumes that cannot be regenerated from the database.
Restore Typesense or run a full reindex.
Recreate Redis and enqueue jobs again.
Validate the application from outside before reopening writes.
Configuration declared in Git makes clusters and services reproducible. External credentials—especially the private age key and access to Infisical's backup—make it possible to recover the secrets required for that configuration to start.
What remains unresolved
The current architecture has known gaps. spinoza holds the main destination and remains a single point of failure. It needs another copy at a separate site and protection against deletion, such as immutability or Object Lock.
Automated restore tests are also missing. Restic and Barman can check repository integrity, but that does not prove that a recovered database starts or that the application works with it. A periodic exercise should restore into an isolated environment and verify the result.
Stating those gaps is part of the design. The current copies reduce many risks, but they do not yet provide complete protection against losing Athens or compromised credentials.
The final rule of the series is simple: design the restore path at the same time as the backup, and test it before you need it.