Delivery Database Backup¶
The Delivery Database Backup extension is a cronjob which regularly creates backups of the PostgreSQL delivery database and stores them as local blobs in an OCM component. This enables disaster recovery and migration scenarios.
Configuration Example¶
delivery_db_backup:
schedule: '0 0 * * *' # daily at midnight
successful_jobs_history_limit: 1
failed_jobs_history_limit: 1
component_name: acme.org/odg-backups
ocm_repo_url: https://ocm-registry.example.com
backup_retention_count: 10
initial_version: 0.1.0
extra_pg_dump_args: ["--verbose"]
Top-Level Options¶
Option |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Cron schedule for running the cronjob (daily at midnight by default). |
|
int |
|
Number of successful job executions to retain in history. |
|
int |
|
Number of failed job executions to retain in history. |
|
string |
— |
OCM component name to store backups (e.g., |
|
string |
— |
OCM repository URL where backups are published. |
|
int or null |
|
Number of backups to retain. |
|
string |
|
Initial SemVer version for the backup component. |
|
list |
|
Additional arguments passed to |
Configuration Details¶
component_name¶
The name of the OCM component used to store database backups as local blobs. Each backup becomes a new version of this component.
Format: Use standard OCM component naming (e.g., organization.domain/backup-name)
Example:
component_name: acme.org/odg-production-backups
ocm_repo_url¶
The OCM repository URL where backup components are published. This must be an OCI registry that supports OCM components.
Required Permissions:
readwrite: Required for creating backupsadmin: Required ifbackup_retention_countis set (to delete old backups)
Example:
ocm_repo_url: https://ghcr.io/my-org
Note: Configure the corresponding OCI registry credentials via secrets.oci-registry
in your ODG configuration.
backup_retention_count¶
Controls how many backup versions to retain. When set to a value > 0, the extension automatically deletes old backups, keeping only the most recent N backups.
Options:
null(default): Keep all backups indefinitelyInteger > 0: Keep only the most recent N backups
Examples:
backup_retention_count: null- Never delete backupsbackup_retention_count: 7- Keep last 7 backups (e.g., one week of daily backups)backup_retention_count: 30- Keep last 30 backups
Important: Setting this to a non-null value requires admin permissions on the OCM repository to delete old component versions.
initial_version¶
The initial SemVer version for the backup OCM component. Upon each new backup, the minor version is automatically bumped.
Example version progression:
First backup:
0.1.0Second backup:
0.2.0Third backup:
0.3.0And so on…
Recommendation: Use 0.1.0 for production and 0.0.1 for testing environments.
extra_pg_dump_args¶
Additional command-line arguments passed to the pg_dump utility. Use this to
customize backup behaviour.
Common examples:
# Verbose output for debugging
extra_pg_dump_args: ["--verbose"]
# Include BLOB data
extra_pg_dump_args: ["--blobs"]
# Compress backup
extra_pg_dump_args: ["--compress=9"]
# Multiple arguments
extra_pg_dump_args: ["--verbose", "--compress=9"]
Available options: See pg_dump documentation