Skip to content

Choosing the Backup Store

Decision #1160 first chose Garage on the Mac mini, to get an off-site copy without a new paid account. Task #1179 then found what that would take (2026-10-19), and on 2026-10-20 the owner replaced it with Hetzner Object Storage in Falkenstein (decision #1226). This page records why.

What Garage on the Mac mini would have needed

  • A connection into the home network. The options were Tailscale with its Kubernetes operator (a new SaaS account), a self-hosted WireGuard gateway in the cluster (a firewall rule, a MetalLB UDP service and a NET_ADMIN pod), or a public TLS endpoint at home (an open port, a stable IPv4, DDNS).
  • Garage ≥ v2.0.0, a matching SigV4 region and path-style addressing to work with the CNPG Barman Cloud Plugin.
  • No object lock or versioning. Anyone holding the key could delete every backup, and the ops agent planned with cluster-admin (epic #66) can read that key.
  • One machine, one disk at home.

Why Hetzner Object Storage

Garage on the Mac mini Hetzner Object Storage (fsn1)
Price free €6.49/month per account (2026), 1 TB storage and 1 TB egress included
Connection tunnel or open port, plus a Mac mini that stays on plain HTTPS from the cluster
Off-site yes (home) yes, different location from the cluster (nbg1)
Deletion protection none object lock, COMPLIANCE
Hardware one disk erasure coding over several servers
CNPG Barman Cloud Plugin works with conditions standard S3

A Hetzner Storage Box (about €3.20/month) was also considered. It is cheaper and its snapshots can't be deleted from the cluster, but it speaks SFTP, not S3, and the Barman Cloud Plugin supports only S3, Azure and GCS. CNPG would have lost WAL and point-in-time restore or needed a self-run S3 gateway. A Storage Box remains an option for a second copy later.

Things learned while provisioning (2026-10-20)

  • No Terraform resources for Object Storage. The hcloud provider (1.70) manages Storage Boxes but not Object Storage, and projects and S3 credentials can only be created in the Hetzner Console. The buckets are managed through the S3 API with the aws provider.
  • aws provider v6 region. Each resource needs region = "fsn1" set itself; otherwise the per-resource region falls back to us-east-1 and requests are signed for the wrong region.
  • Lifecycle rules. aws_s3_bucket_lifecycle_configuration times out against Hetzner: Hetzner stores the rules but does not return transition_default_minimum_object_size, and the provider waits for it. The stage sets the rules with a signed curl PUT from Terraform and reads them back. Hetzner returns rules in the older form with <Prefix> instead of <Filter>.
  • Endpoints are per location, independent of buckets: https://fsn1.your-objectstorage.com (also nbg1, hel1).

Next steps

  1. #1228 (agent): wire the backup-store secret (ClusterExternalSecret from clusters/hetzner-mgmt/backup-store/s3) and the smoke Job into hetzner-mgmt, and update the diagrams. No tunnel or in-cluster proxy is needed.
  2. Then the consumers: CNPG backups (#1180), the Gitea gate (#1181) and the other gates.
  3. Harbor's registry moved to skatzi-harbor-registry in #1364 (Harbor). Still open: a second copy outside Hetzner.