Restore an Azure Postgresql server database from a previous backup that is stored in an Azure storage account Mainly designed to be used in DR and DR test procedures
Federated credentials must be set up to allow the action to authenticate to Azure and kubernetes
storage-account
: Name of the Azure atorage account that contains the backup (Required)resource-group
: Azure resource group of the storage account (Required)app-name
: Name of the aks app deployment (Required)namespace
: Namespace where the app is deployed. Required when role is not cluster admin.cluster
: AKS cluster to use, test or production (Required)azure-credentials
: A JSON string containing service principal credentials e.g. {“client_id”: “x”, “client_secret”: “x”, “subscription_id”: “x”, “tenant_id”: “x”}azure-client-id
: Azure service principal or managed identity client ID when using OIDCazure-subscription-id
: Azure service principal or managed identity subscription ID when using OIDCazure-tenant-id
: Azure service principal or managed identity tenant ID when using OIDCbackup-file
: Name of the source backup file that is being restored (Required)jobs:
main:
...
permissions:
id-token: write # Required for OIDC authentication to Azure
...
steps:
- name: Restore postgres backup
uses: DFE-Digital/github-actions/restore-postgres-backup@master
with:
storage-account: myserviceqabkpsa
resource-group: s189t01-app-rg
app-name: myservice-qa
cluster: test
namespace: $
azure-client-id: $
azure-subscription-id: $
azure-tenant-id: $
backup-file: backup290224