Skip to content

Commit

Permalink
adding database backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Coon committed Apr 16, 2024
1 parent 0c4afa2 commit 20a8c68
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/backup-database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: backup database
on:
- workflow_dispatch
jobs:
backup:
runs-on: self-hosted
steps:
- name: backup
run: |
CONTAINER_NAME=$(kubectl -n bryce2 get pods --no-headers -o custom-columns=":metadata.name" | grep "blazor-web-db-deployment")
kubectl -n bryce2 exec -t $CONTAINER_NAME -- \
pg_dumpall -c -U postgres \
> /home/bryce/dump.sql

0 comments on commit 20a8c68

Please sign in to comment.