Backups¶
Status: live
The bucket exists (2026-10-20, Terraform stage terraform/environments/hetzner-object-storage/), and hetzner-mgmt creates the backup-store secret and runs the smoke Job (component components/backup-store/, task #1228). The Job backup-store-smoke in namespace backup-store succeeded on 2026-10-20 (log ends backup-store smoke OK: smoke/20261020T194715Z), so the store is live. The smoke delete returns DeleteMarker: true, which is expected with object lock.
Where backups go¶
All platform backups go to one bucket in Hetzner Object Storage in Falkenstein (fsn1), a different location from the hetzner-mgmt cluster in Nuremberg. This covers CNPG base backups and WAL, the dumps taken by <component>-preupgrade gates (Renovate architecture §11) and other platform snapshots. Why this store and not Garage on the Mac mini is in Choosing the backup store.
- Endpoint:
https://fsn1.your-objectstorage.com, regionfsn1, path-style addressing - Bucket:
skatzi-backups, in its own Hetzner projectskatzi-backups - Credentials: OpenBao
clusters/hetzner-mgmt/backup-store/s3(propertiesendpoint,bucket,region,access_key_id,secret_access_key) - Managed by: Terraform stage
terraform/environments/hetzner-object-storage/(local state, like thehetzner-mgmt-clusterstages; its README has the manual Console steps)
A Hetzner S3 credential gives full access to every bucket in its project. Backups therefore have their own project: the backup key can't reach application buckets (such as skatzi-harbor-registry in project skatzi-apps), and their keys can't reach the backups.
The webshop cluster's backups go to their own bucket, webshop-backups, in fsn1 in the webshop Hetzner project, with the same versioning, object lock and lifecycle rules as below. It is managed by Terraform stage terraform/environments/hetzner-webshop-cluster/4-storage, and its credentials are at OpenBao clusters/webshop/backup/s3 (same properties). It is not a prefix in skatzi-backups because a Hetzner key reaches every bucket in its project: the key on the webshop cluster must not read the platform's backups. The bucket exists once the owner has applied the stage (task #2010). The CNPG backups to it are described in the webshop environment README.
Each component writes under its own prefix:
s3://skatzi-backups/<cluster>/<component>/...
# e.g. hetzner-mgmt/gitea/, hetzner-mgmt/cnpg/taskbase-prod/, hetzner-mgmt/openbao/
Consuming the store¶
Label the namespace:
A ClusterExternalSecret then creates a Secret named backup-store in that namespace, with this shape:
| Key | Meaning |
|---|---|
AWS_ENDPOINT_URL |
https://fsn1.your-objectstorage.com |
AWS_REGION |
fsn1 (SigV4 must sign for it) |
BUCKET |
skatzi-backups |
AWS_ACCESS_KEY_ID |
key of the skatzi-backups project |
AWS_SECRET_ACCESS_KEY |
its secret |
The keys use the AWS environment variable names, so a Job can use envFrom: [{secretRef: {name: backup-store}}] with aws, rclone or restic directly. Set AWS_REQUEST_CHECKSUM_CALCULATION=when_required and AWS_RESPONSE_CHECKSUM_VALIDATION=when_required for current AWS SDKs (boto3, awscli, the AWS Go SDK) against S3-compatible stores, and then send Content-MD5 on uploads yourself, as the smoke Job does: S3 refuses an upload into a bucket with object lock retention unless it carries Content-MD5 or an SDK checksum header (PutObject).
The Barman Cloud Plugin's ObjectStore is the exception. It references the access keys and region through s3Credentials and sets no endpointURL: barman-cloud reads the address from AWS_ENDPOINT_URL, which the ObjectStore passes into the sidecar from the same Secret. It uses boto3's default virtual-hosted addressing (Hetzner serves <bucket>.fsn1.your-objectstorage.com) and sets no encryption. It does not set the checksum variables: barman-cloud sends no Content-MD5 on uploads, so boto3's default checksum header is what lets its uploads into the locked bucket through. See the CloudNativePG page.
Protection and retention¶
- Object lock, COMPLIANCE, 14 days (bucket default, with versioning). No one can delete or overwrite a backup version younger than 14 days: not the cluster, not an agent with cluster-admin, not a person holding the key. GOVERNANCE would not help here, because every Hetzner project key has full rights and could bypass it. Object lock can't be turned off for the bucket.
- Deleting a backup (Barman's retention, a gate pruning old dumps) only adds a delete marker. The bucket's lifecycle rule removes non-current versions after 31 days and cleans up expired delete markers.
- CNPG: the Barman Cloud Plugin's
retentionPolicy: "30d". It is longer than the lock, so Barman can clean up. Never add a lifecycle expiry on a CNPG prefix: it would delete WAL that a retained base backup still needs. How CNPG clusters are backed up and drilled is on the CloudNativePG page. - Gate dumps and other files: a per-prefix expiry, e.g. 30 days, added to
backup_expiring_prefixesin the Terraform stage. S3 keeps one lifecycle document per bucket, so every rule lives in that stage; a rule set any other way is overwritten on the next apply. - Gate dumps that a drill restores: no lifecycle expiry. The gate prunes them itself, keeping every dump younger than 30 days and always the newest three; a prune is a delete marker like any other delete. An expiry would remove the only backup a weekly drill restores when no upgrade has run for 30 days. Gitea and Harbor do this (Gitea backups, Harbor backups), so
<cluster>/gitea/and<cluster>/harbor/must not be added tobackup_expiring_prefixes. - OpenBao:
<cluster>/openbao/snapshots/expires after 30 days; the nightly snapshot keeps the newest one fresh (OpenBao backups). - Whole bucket: incomplete multipart uploads are aborted after 1 day.
- Every backup is kept for at least 14 days.
Smoke check¶
The Job backup-store-smoke in the backup-store namespace writes, lists, reads back and deletes smoke/<timestamp> in the bucket, using the backup-store secret (task #1228). Its success proves the cluster can write to the store. Because of the object lock, the deleted smoke objects stay as non-current versions until the lifecycle rule removes them (31 days); they are a few bytes each.
Failed drills¶
A failed restore drill becomes a Taskbase task, not only a Mattermost post: a passing drill is the condition for a stateful upgrade (Renovate architecture §11). Every drill CronJob runs its Job with backoffLimit: 0 and keeps failed Jobs (failedJobsHistoryLimit), so a failed run leaves a failed Job behind. The upstream rule KubeJobFailed (severity: warning) fires for it after 15 minutes. It is in the kubernetesApps group, which carries incident: "true", so Alertmanager sends it to the taskbase receiver as well as to Mattermost (Prometheus stack: receivers and routes). Taskbase opens one incident task in the Platform project (Skatzi/platform) per cluster, alert and namespace, for the operator persona.
This covers any drill namespace without configuration: gitea-scratch, harbor-scratch, cnpg-drill, openbao-drill, and the scratch namespace of a future gate, as long as its drill runs as a Job that ends Failed. The alert carries no component label, so Taskbase uses the namespace (for example gitea-scratch) as the component.
- The incident does not resolve when the next drill passes:
KubeJobFailedfires while the failed Job exists. Delete the failed Job once the cause is fixed and a drill has passed (kubectl --context <context> -n <namespace> delete job <job>, with the context for the alert'sclusterlabel in place of<context>, as in rule 8 of the rules of engagement); Alertmanager then sends the resolve. - A drill that does not run at all (CronJob suspended, never scheduled) leaves no failed Job, so
KubeJobFaileddoes not see it. The CNPG drills haveCNPGRestoreDrillFailedfor that (CloudNativePG: alerts), OpenBao hasOpenBaoRestoreDrillFailed; a failed CNPG or OpenBao drill can therefore open a second incident under that alert.
Cost¶
Hetzner charges a base price per account (€6.49/month in 2026, excl. VAT) that includes 1 TB of storage and 1 TB of egress, across all projects and buckets. Ingress, S3 requests and traffic inside eu-central (Nuremberg, Falkenstein, Helsinki) are free. The platform's backups are far below 1 TB.
The Platform health Object Storage panels show measured current and non-current object versions against the included 1 TB, for this bucket and Harbor's skatzi-harbor-registry. Each bucket has its own scanner, namespace and key: object-storage-exporter reads this bucket with the backup-store secret, object-storage-exporter-harbor reads Harbor's bucket (Harbor).
Risks¶
- Not a backup of the backups. Hetzner stores each object with erasure coding across several servers in
fsn1, but makes no backup of it and does not copy it to another location. The object lock protects against deletion, not against losing the location or the Hetzner account. A second copy outside Hetzner (for example a nightly pull to the Mac mini) is a later step. - Availability. Hetzner Object Storage had periods of degraded service in 2026. A backup or gate that fails because of it is the safe failure: the upgrade behind the gate does not run.
- Locked test data stays. Anything written to the bucket, including tests, stays at least 14 days.