File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,23 +39,23 @@ spec:
39
39
echo "Uploading backup to s3 bucket..."
40
40
backup_date=$(date +%Y%m%d)
41
41
aws s3 cp /tmp/prod_backup.gz s3://$BUCKET_NAME/daily/prod_backup-$backup_date.gz \
42
- --endpoint-url=https://$ACCOUNT_ID.r2.cloudflarestorage.com \
42
+ --endpoint-url=$ENDPOINT_URL \
43
43
--checksum-algorithm CRC32
44
44
45
- month_day =$(date +%m %d)
46
- if [ "$month_day " = "0101" ] || [ "$month_day" = "0601 " ]; then
45
+ date_day =$(date +%d)
46
+ if [ "$date_day " = "01 " ]; then
47
47
echo "Also uploading to persistent storage"
48
48
aws s3 cp /tmp/prod_backup.gz s3://$BUCKET_NAME/persistent/prod_backup-$backup_date.gz \
49
- --endpoint-url=https://$ACCOUNT_ID.r2.cloudflarestorage.com \
49
+ --endpoint-url=$ENDPOINT_URL \
50
50
--checksum-algorithm CRC32
51
51
fi
52
52
53
53
# Cleanup local files
54
54
rm /tmp/prod_backup.gz
55
55
echo "MongoDB backup completed successfully!"
56
56
env :
57
- - name : ACCOUNT_ID
58
- value : ff660bd2dac18c00551ed509d24ef4d7
57
+ - name : ENDPOINT_URL
58
+ value : https:// ff660bd2dac18c00551ed509d24ef4d7.r2.cloudflarestorage.com
59
59
- name : BUCKET_NAME
60
60
value : prod-mongo-backups
61
61
envFrom :
You can’t perform that action at this time.
0 commit comments