Skip to content

backup-database

backup-database #1

Workflow file for this run

name: 'backup-database'
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
supabase_db_url: postgres://postgres.qpfpqzjzriwrmtnwawit:[email protected]:5432/postgres # For example: postgresql://postgres:[YOUR-PASSWORD]@db.<ref>.supabase.co:5432/postgres
steps:
- uses: actions/checkout@v2
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Backup roles
run: supabase db dump --db-url "$supabase_db_url" -f roles.sql --role-only
- name: Backup schema
run: supabase db dump --db-url "$supabase_db_url" -f schema.sql
- name: Backup data
run: supabase db dump --db-url "$supabase_db_url" -f data.sql --data-only --use-copy