Skip to content

Commit

Permalink
chore(anonymizer): use hardcoded host
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Jul 11, 2024
1 parent 6aa7aa7 commit 101dc1b
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,31 +201,26 @@ jobs-restore-anonymous-prod:
secretKeyRef:
name: domifa-prod-backups-access-key
key: bucket_endpoint
# - name: PGUSER
# valueFrom:
# secretKeyRef:
# name: managed-db-admin-anonymous
# key: ADMIN_PG_USER
# - name: PGPASSWORD
# valueFrom:
# secretKeyRef:
# name: managed-db-admin-anonymous
# key: ADMIN_PG_PASSWORD
- name: PGUSERAPP
- name: PGUSER
valueFrom:
secretKeyRef:
name: managed-db-admin-anonymous
key: PGUSER
- name: PGDATABASE
key: ADMIN_PG_USER
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: managed-db-admin-anonymous
key: PGHOST
key: ADMIN_PG_PASSWORD
- name: PGUSERAPP
valueFrom:
secretKeyRef:
name: managed-db-admin-anonymous
key: PGUSER
run: |
set -e
root_path=domifa-prod-backups/anonymizer/pg_dumps
last_dir=$(aws s3 ls s3://$root_path --recursive | awk '{print $4}' | cut -d "/" -f3 | tail -n 1)
echo "Restoring $last_dir"
aws s3 cp --recursive s3://$root_path/$last_dir /tmp/dump/$last_dir
export PGSSLMODE=disable
pg_restore --clean --if-exists --no-owner --role=$PGUSERAPP --no-acl --verbose /tmp/dump/$last_dir
pg_restore -h postgresql-77eca822-od41f3361.database.cloud.ovh.net -p 20184 --clean --if-exists --no-owner --role=$PGUSERAPP --no-acl --verbose /tmp/dump/$last_dir --dbname defaultdb

0 comments on commit 101dc1b

Please sign in to comment.