File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1919 exit 1
2020fi
2121
22+ if [ -z " $ENDPOINT_URL " ]; then
23+ echo " Error: ENDPOINT_URL is missing."
24+ exit 1
25+ fi
26+
2227if [ -z " $S3_BUCKET " ]; then
2328 echo " Error: S3_BUCKET is missing."
2429 exit 1
@@ -39,7 +44,7 @@ pg_dump "$CONNECTION_ARG" $TABLE_FLAGS -Fc -a -f "/tmp/$BACKUP_FILE"
3944
4045echo " Backup created. Uploading to $S3_PATH ..."
4146
42- aws s3 cp " /tmp/$BACKUP_FILE " " $S3_PATH "
47+ aws s3 cp " /tmp/$BACKUP_FILE " " $S3_PATH " --endpoint-url " $ENDPOINT_URL "
4348
4449rm " /tmp/$BACKUP_FILE "
4550
Original file line number Diff line number Diff line change 3030 echo " Error: Input file not found locally and S3_BUCKET env var is missing."
3131 exit 1
3232 fi
33+ if [ -z " $ENDPOINT_URL " ]; then
34+ echo " Error: ENDPOINT_URL is missing."
35+ exit 1
36+ fi
3337
3438 S3_FULL_PATH=" s3://${S3_BUCKET} /${S3_PREFIX}${INPUT_ARG} "
3539 RESTORE_FILE=" /tmp/restore_temp.dump"
3640 SHOULD_CLEANUP=true
3741
3842 echo " Local file '$INPUT_ARG ' not found. Attempting download from $S3_FULL_PATH ..."
39- aws s3 cp " $S3_FULL_PATH " " $RESTORE_FILE "
43+ aws s3 cp " $S3_FULL_PATH " " $RESTORE_FILE " --endpoint-url " $ENDPOINT_URL "
4044fi
4145
4246echo " Restoring data to database..."
You can’t perform that action at this time.
0 commit comments