Skip to content

feat(DAAC-456): Enable backup of databases to object store#5

Merged
rjaduthie merged 9 commits into
mainfrom
daac-456-enable-onyx-database-backups
Mar 27, 2026
Merged

feat(DAAC-456): Enable backup of databases to object store#5
rjaduthie merged 9 commits into
mainfrom
daac-456-enable-onyx-database-backups

Conversation

@rjaduthie
Copy link
Copy Markdown
Contributor

Features

This PR adds:

  • Ansible role to create a backup job on the Onyx database VM
  • Ansible added to the OpenTofu providers
  • Configuration of a frequent (every 2 hours) backup and a daily backup, the former with 24 hours lifetime and the latter with 7 days lifetime
  • Backup stored in OpenStack object store

Testing

Ansible applied from branch to the VM (using TF). Backup shown to be working using swift CLI:

$ swift list uksrc-backups
postgres-vm_caom_20260317_154113.sql.gz
postgres-vm_caom_20260317_154115.sql.gz
postgres-vm_caom_20260317_160016.sql.gz
postgres-vm_caom_preprod_20260317_154113.sql.gz
postgres-vm_caom_preprod_20260317_154115.sql.gz
postgres-vm_caom_preprod_20260317_160016.sql.gz
postgres-vm_postgres_20260317_154113.sql.gz
postgres-vm_postgres_20260317_154115.sql.gz
postgres-vm_postgres_20260317_160016.sql.gz
postgres-vm_software_discovery_20260317_154113.sql.gz
postgres-vm_software_discovery_20260317_154115.sql.gz
postgres-vm_software_discovery_20260317_160016.sql.gz
postgres-vm_software_discovery_preprod_20260317_154113.sql.gz
postgres-vm_software_discovery_preprod_20260317_154115.sql.gz
postgres-vm_software_discovery_preprod_20260317_160016.sql.gz

... extra backups here were created when the service started, then the frequent backup at 1600 was also created.

Comment thread onyx-databases/ansible/roles/backup_database/README.md Outdated
Comment thread onyx-databases/ansible/group_vars/all/backup.yml Outdated
Comment thread onyx-databases/ansible/roles/backup_database/README.md Outdated
@rjaduthie rjaduthie merged commit 65d2eed into main Mar 27, 2026
@rjaduthie rjaduthie deleted the daac-456-enable-onyx-database-backups branch March 27, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants