Backup Database to Azure Storage #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backup Database to Azure Storage | |
concurrency: build_and_deploy_main | |
on: | |
workflow_dispatch: | |
# TODO: Uncomment after migration | |
# schedule: # 03:00 UTC | |
# - cron: "0 3 * * *" | |
jobs: | |
# backup: | |
# name: Backup AKS Database (production) | |
# runs-on: ubuntu-latest | |
# environment: production-aks | |
# steps: | |
# - name: Backup postgres | |
# uses: DFE-Digital/github-actions/backup-postgres@1914-claims-db-backup | |
# with: | |
# storage-account: s189p01captdbbkppdsa | |
# resource-group: s189p01-capt-pd-rg | |
# app-name: claim-additional-payments-for-teaching-production-web | |
# cluster: production | |
# azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} | |
# backup-file: capt_prod_$(date +"%F").sql | |
restore: | |
name: Restore AKS Database (production) | |
runs-on: ubuntu-latest | |
environment: production-aks | |
steps: | |
- name: Restore postgres | |
uses: DFE-Digital/github-actions/restore-postgres-backup@master | |
with: | |
storage-account: s189p01captdbbkppdsa | |
resource-group: s189p01-capt-pd-rg | |
app-name: claim-additional-payments-for-teaching-production-web | |
cluster: production | |
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} | |
backup-file: capt_prod_2024-07-12.sql.gz |