16. Logical database dump, not a volume snapshot
Date: 2026-10-25
Status
Section titled “Status”Accepted
Context
Section titled “Context”A restore of TAK needs database cot and ConfigMap cert-migration. CloudTAK needs its PostGIS database and Secret cloudtak-tak-admin. cert-migration holds the CA and the server keystores from deploy time. Without those files, a client certificate issued before the backup no longer chains to the server.
UDS Core 1.15.2 backup-restore installs Velero v1.18.4 with the AWS and Azure plugins. It does not ship a node-agent image. File-system backup needs that agent, plus host access that this package would have to exempt. The default schedule velero-udsbackup runs at 03:00 UTC with snapshotVolumes: false. k3d local-path has no VolumeSnapshot API, so a backup copies API objects and leaves the Postgres files on the node.
values/common-values.yaml is input to the upstream TAK chart. That chart does not have a place to store a logical dump, and a Velero hook on its Postgres pod cannot write a Secret. The pod has no API client and no Role for one.
A Secret is about 1Mi. A fresh CI database fits once gzipped. A long-lived TAK database may not.
Decision
Section titled “Decision”- Capture
cotand the CloudTAK database withpg_dump, and store each dump in a Secret (tak-db-dump,cloudtak-db-dump). Velero backs those Secrets up with the namespace. File-system backup is not used. - The CronJobs, their Roles, and their network rules render only when
backup.dump.enabledis true. The default is false, so a slim install is unchanged when Velero is absent.bundle/full/uds-bundle.yamlturns the switch on.test-values.yamldoes not, because the slim bundle uses that file too. - The CronJobs run at 02:15 and 02:20 UTC, before the default Velero schedule. Each dump is gzipped into key
dump.sql.gz. A gzipped dump over 700000 bytes fails the job instead of writing a Secret that will not fit. (Amended 2026-11-01: the plain SQL of the CIcotdatabase passed 700000 bytes, so the dumps are now gzipped.tests/db-dump-secret.shreadsdump.sql.gzand falls back todump.sql, so a Secret from before the change still restores.) tests/backup-restore.shruns at the end oftest:full-core. It writes marker tableuds_restore_marker, dumps both databases, runs a Backup oftakserverandcloudtak, deletes those namespaces, runs a Restore, loads the dumps back because the volumes were not in the backup, reads the marker, and runstests/api-smoke.shwith the client certificate copied out before the delete.- The full-core job scales the checkpoint MinIO Deployment back to 1 for that test.
fit-runnerhad scaled it to 0. Velero’s default bucket isudson that MinIO. BackupStorageLocation has to beAvailableor the test fails. - In-memory Ignite state is not backed up. CoreConfig and the Ignite ConfigMap are rendered again from the chart.
Consequences
Section titled “Consequences”- Slim stays free of dump CronJobs and of Velero. The full bundle requires
core-backup-restore. - A database that outgrows a Secret needs file-system backup. That path is ADR 0021. It stays off unless
FILESYSTEM_BACKUP=true. - The restore test deletes the TAK and CloudTAK namespaces. It is the last command in
test:full-core. - Whether Backup and Restore reach
Completedon the GitHub runners is visible only after the full-core workflow runs.