Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Add script for downloading latest snapshot tar.gz #2157

Merged
merged 4 commits into from
Sep 4, 2023

Conversation

tsmethurst
Copy link
Contributor

@tsmethurst tsmethurst commented Aug 24, 2023

Description

If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements.

If this is a documentation change, please briefly describe what you've changed and why.

This pull request adds a quick and fairly dirty bash script into the scripts directory that folks can use to pull the latest snapshot release tar.gz from our Minio S3 bucket.

I didn't advertise it anywhere in the docs because it's not something we should really 'recommend' to people, but we can at least point it to folks who regularly run snapshots and want a very slightly easier way of doing it.

Checklist

Please put an x inside each checkbox to indicate that you've read and followed it: [ ] -> [x]

If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).

MINIO_ENDPOINT="https://${MINIO_HOST}/${MINIO_BUCKET}/${LATEST_HASH}/${GTS_FILENAME}"

echo "fetching latest snapshot tar.gz from endpoint '${MINIO_ENDPOINT}'"
wget --no-verbose -O "./${GTS_FILENAME}" "${MINIO_ENDPOINT}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use wget here when we're already using curl above? If it's following redirects + setting output file you want then just do something like curl -sLo "./${GTS_FILENAME}" "${MINIO_ENDPOINT}"

Copy link
Member

@daenney daenney Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add something like --fail --retry 5 --retry-max-time 600 to "both" curl commands. That should make it a bit more robust in case something temporarily blips.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you comrades! Will fix this up tomorrow most likely :)

@tsmethurst tsmethurst merged commit 9f2199f into main Sep 4, 2023
@tsmethurst tsmethurst deleted the cheeky_snapshot_script branch September 4, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants