mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
added gzip to backups to save some space
This commit is contained in:
@@ -4,10 +4,10 @@ set -e
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# filename with timestamp
|
# filename with timestamp
|
||||||
filename="postgres-$(date +%Y-%m-%d_%H-%M-%S).sql"
|
filename="postgres-$(date +%Y-%m-%d_%H-%M-%S).sql.gz"
|
||||||
|
|
||||||
# perform pg_dump
|
# perform pg_dump
|
||||||
pg_dump -U postgres postgres > /tmp/$filename
|
pg_dump -U postgres postgres | gzip -c > /tmp/$filename
|
||||||
|
|
||||||
# upload to s3
|
# upload to s3
|
||||||
aws s3 cp /tmp/$filename s3://$S3_BUCKET_NAME/$filename
|
aws s3 cp /tmp/$filename s3://$S3_BUCKET_NAME/$filename
|
||||||
|
|||||||
Reference in New Issue
Block a user