Skip to content

Commit

Permalink
feat: new tar.gz name to make searchable in minio
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkoro committed Mar 17, 2023
1 parent e4fbf9d commit b17fb1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ echo "S3 pinged successfully"

# Create tar.gz file
echo "Creating tar.gz file"
if ! tar -czf "/tmp/${BACKUP_NAME}-${CURRENT_DATE}.tar.gz" --exclude="${BACKUP_NAME}-${CURRENT_DATE}.tar.gz" ./; then
if ! tar -czf "/tmp/${BACKUP_NAME}_${CURRENT_DATE}.tar.gz" --exclude="${BACKUP_NAME}_${CURRENT_DATE}.tar.gz" ./; then
echo "Could not create tar.gz file"
exit 1
fi
echo "Tar.gz file created successfully"

# Upload backup file to s3
echo "Uploading backup file to S3"
if ! mc cp "/tmp/${BACKUP_NAME}-${CURRENT_DATE}.tar.gz" "${S3_ALIAS_NAME}/${S3_BUCKET}"; then
if ! mc cp "/tmp/${BACKUP_NAME}_${CURRENT_DATE}.tar.gz" "${S3_ALIAS_NAME}/${S3_BUCKET}"; then
echo "Could not upload backup file to S3"
exit 1
fi
Expand Down

0 comments on commit b17fb1c

Please sign in to comment.