Backups and recovery
Send encrypted database backups to object storage and restore into a fresh database.
Hakopod can back up supported PostgreSQL and MySQL databases, or its own management database, to S3-compatible object storage. Backups are encrypted with age before upload. Backup and restore APIs require an unrestricted installation administrator.
Add a destination#
Create a bucket with your storage provider first. In Backups, add a destination with the endpoint, region, bucket, prefix and the provider's path-style setting. Use HTTPS and credentials limited to the chosen prefix, including the object and multipart operations needed for upload, restore and deletion.
The connection test writes a random object, reads and verifies it, then deletes it. A failed provider operation is reported as a failure. Hakopod does not create production buckets on your behalf.
When creating the destination, save its generated recovery key outside Hakopod. It is returned only once. You can instead supply an existing age X25519 identity. Keep the original authentication encryption key and installer configuration separately as well; the destination record is not a replacement for them.
Destination locations and encryption identities are immutable. Create another destination to change the endpoint, bucket or prefix without redirecting old artifacts.
Know what is included#
| Backup | Included | Not included |
|---|---|---|
| PostgreSQL | One logical database in custom dump format. | Global roles, tablespaces, server settings, WAL and point-in-time recovery. |
| MySQL | One logical database, routines, events and triggers. | Users, grants, global settings, binlogs and point-in-time recovery. |
| Hakopod management | Accounts, specifications, job history, audits and encrypted credential records in its database. | The authentication encryption key, installer files, Kubernetes state or Secrets, application data volumes, images and external objects. |
A management backup is not a complete host or cluster recovery image. Back up installation files, K3s state, keys and application volumes through their appropriate procedures too.
Application adapters support the documented official PostgreSQL and MySQL images and their configured database variables. They need a uniquely owned running pod with the expected database tools and privileges. For MySQL, InnoDB data uses a consistent transaction; avoid concurrent DDL, and plan maintenance for nontransactional tables.
Schedule and retain#
Create a schedule for the source, destination, interval and retention you need. Schedules retain an administrator owner and stop scheduling if that owner loses administration. Missed intervals are coalesced rather than replayed as a backlog.
There is one running backup or restore at a time across the API processes. Data streams through bounded buffers; the entire dump is not loaded into memory. Review object-store lifecycle rules for incomplete multipart uploads and historical object versions, since provider retention affects storage cost.
Restore safely#
Choose a successful artifact and a compatible target database service. Hakopod generates a review with an exact new hp_restore_<id> database name, the target revision and pod identity. Confirm that name within the review's validity period.
The worker downloads the encrypted artifact, verifies its size, checksum and authenticated encryption before sending SQL. It refuses an existing target database name. It does not automatically change your application's connection settings.
After restoration, inspect the new database, test your application against it and plan the connection change. A failed restore may leave a partial new database, particularly with MySQL DDL. Inspect it before creating another review; Hakopod does not delete it automatically or replay a started restore after a crash.
Restore only trusted archives: database definitions can execute code with the restoring user's privileges. Test with a separate service when crossing trust boundaries. Successful local tests do not verify your provider, dataset size, cross-version migration or full host recovery.
The detailed recovery guide records exact adapter requirements, retention behavior and verification limits.