Skip to content

Commit

Permalink
No owner on pg_dump
Browse files Browse the repository at this point in the history
  • Loading branch information
dgboss committed Dec 5, 2024
1 parent 99e6698 commit 0869ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openshift/s3-backup/docker/backup_to_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ _target_folder="${PG_HOSTNAME}_${PG_DATABASE}/${_datestamp}"
# Using the official aws cli to upload the database back to S3:
# pg_dump | gzip | aws s3:
# this is tested and works.
PGPASSWORD="${PG_PASSWORD}" pg_dump -Fp -h "${PG_HOSTNAME}" -p ${PG_PORT} -U "${PG_USER}" "${PG_DATABASE}" | gzip | AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY}" AWS_SECRET_ACCESS_KEY="${AWS_SECRET_KEY}" aws --endpoint="https://${AWS_HOSTNAME}" s3 cp - "s3://${AWS_BUCKET}/backup/${_target_folder}/${_target_filename}"
PGPASSWORD="${PG_PASSWORD}" pg_dump -Fp -h --no-owner "${PG_HOSTNAME}" -p ${PG_PORT} -U "${PG_USER}" "${PG_DATABASE}" | gzip | AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY}" AWS_SECRET_ACCESS_KEY="${AWS_SECRET_KEY}" aws --endpoint="https://${AWS_HOSTNAME}" s3 cp - "s3://${AWS_BUCKET}/backup/${_target_folder}/${_target_filename}"

# Run python code to prune old backups.
python3 prune.py

0 comments on commit 0869ef8

Please sign in to comment.