File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,15 @@ POSTGRES_HOST_OPTS="-h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER $POSTG
59
59
60
60
echo " Creating dump of ${POSTGRES_DATABASE} database from ${POSTGRES_HOST} ..."
61
61
62
- pg_dump $POSTGRES_HOST_OPTS $POSTGRES_DATABASE | gzip > dump.sql.gz
62
+ pg_dump -Fc $POSTGRES_HOST_OPTS $POSTGRES_DATABASE > db.dump
63
63
64
64
echo " Uploading dump to $S3_BUCKET "
65
65
66
- cat dump.sql.gz | aws $AWS_ARGS s3 cp - s3://$S3_BUCKET /$S3_PREFIX /${POSTGRES_DATABASE} _$( date +" %Y-%m-%dT%H:%M:%SZ" ) .sql.gz || exit 2
66
+ cat db.dump | aws $AWS_ARGS s3 cp - s3://$S3_BUCKET /$S3_PREFIX /${POSTGRES_DATABASE} _$( date +" %Y-%m-%dT%H:%M:%SZ" ) .dump || exit 2
67
67
68
- echo " SQL backup uploaded successfully"
68
+ echo " DB backup uploaded successfully"
69
+
70
+ rm db.dump
69
71
70
72
if [ -n $HEALTHCHECKS_IO_CHECK_ID ]; then
71
73
echo " Notifying healthchecks.io"
You can’t perform that action at this time.
0 commit comments