Skip to content

Backup

Backup #679

Workflow file for this run

name: Backup
on:
workflow_dispatch:
schedule:
# Backup our Postgres DB nightly at 2AM AEST (4PM UTC)
- cron: "0 16 * * *"
jobs:
backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout transcrypt
uses: actions/checkout@v4
with:
repository: elasticdog/transcrypt
path: transcrypt
- name: Initialise transcrypt
run: ./transcrypt/transcrypt -c aes-256-cbc -p '${{ secrets.TRANSCRYPT_PASSWORD }}' --yes
- name: Run backup script
run: ./infra/backup.sh
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ vars.AWS_BACKUP_USER_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_BACKUP_USER_SECRET_ACCESS_KEY }}
CLERK_PRIVATE_SSH_KEY: ${{ secrets.CLERK_PRIVATE_SSH_KEY }}
COMPOSE_SUFFIX: prod
S3_BUCKET: s3://anika-database-backups