File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Backup the resilience DB
4-
53# load the env...
6- SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
7- . $SCRIPT_DIR /../.env
4+ # SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+ # . $SCRIPT_DIR/../.env
6+
7+ # Backup the resilience DB
8+ # FIXME - Load somehow, this is from the sample
9+ PGPASSWORD=example123456
810
911pod_name=$( kubectl get pods | grep supabase-supabase-db | cut -f1 -d' ' )
1012backup_file=" resilience-backup-` date +%Y-%m-%d` .sql"
11- user=supabase_admin
13+
14+ # NOTE: user from values.cloud.yml
15+ db_name=postgres
16+ export PGUSER=postgres
17+
1218
1319echo Backing up $pod_name into $backup_file ...
14- kubectl exec -it $pod_name -- bash -c " PGPASSWORD=$DB_PASSWORD pg_dump --schema=public -U $user $DB_NAME " > $backup_file
20+ kubectl exec -it $pod_name -- bash -c " PGPASSWORD=$DB_PASSWORD pg_dump --schema=public -U $user $db_name " > $backup_file
21+ # kubectl exec -it $pod_name -- bash -c "PGPASSWORD=$DB_PASSWORD pg_dumpall -U $user" > $backup_file
22+ # kubectl exec -it $pod_name -- bash -c "PGPASSWORD=$PGPASSWORD PGUSER=$PGUSER pg_dumpall"
23+
1524echo done.
You can’t perform that action at this time.
0 commit comments