Skip to content

Database backup

For reliable Catena SE operation, you must regularly back up the database and be able to restore it.

There is no external access to PostgreSQL. Backups and restores are performed via the db-0 pod in the catena-se namespace.

Creating a backup manually

Run on a host with kubectl configured and cluster access:

kubectl -n catena-se exec db-0 -- backup

The backup is created inside the pod. The file name is based on the timestamp (e.g. dump-2026-02-19-12-40-40.sql.gz).

List of available backups

To see saved backups:

kubectl -n catena-se exec db-0 -- list

Example output:

$ kubectl -n catena-se exec db-0 -- list
2026-02-19-12-40-40
2026-02-19-12-40-47

These are the timestamps to use in the restore command.

Restoring from a backup

Specify the desired timestamp to restore:

kubectl -n catena-se exec db-0 -- restore 2026-02-19-12-40-47

Example restore session:

$ kubectl -n catena-se exec db-0 -- restore 2026-02-19-12-40-47
Restoring from dump-2026-02-19-12-40-47.sql.gz
DROP DATABASE
CREATE DATABASE
SET
...
CREATE INDEX
ALTER TABLE
Restore completed

During restore, it is best to stop Central or avoid making changes in it.

Scheduled backups and cloud upload

The system is configured for daily backups at 3:00 AM.

Optionally, you can set up sending backups to S3 or other storage by copying files from the /backup directory on the head server.