https://github.com/broadinstitute/imaging-backup-scripts
Scripts to backup data for the Imaging Platform
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Scripts to backup data for the Imaging Platform
Basic Info
Statistics
- Stars: 1
- Watchers: 9
- Forks: 3
- Open Issues: 8
- Releases: 0
Topics
Metadata Files
README.md
imaging-backup-scripts
Scripts to backup and archive data
Old approach
We used to create tarballs and move to a separate bucket (s3://imaging-platform-cold) that is set to move all contents to Glacier after 7 days. We no longer do this. See instructions for restoring data from Glacier for tarballs that were archived using this method.
New approach
Our primary bucket is now in "Intelligent Tiering" mode. See notes here and read more about intelligent tiering here.
This means that there's no explicit processing for archiving files. They automatically and gradually move into a Glacier'd state after 6 months.
There are two approaches for restoring such files.
- For restoring individual files, do this
sh
aws s3api \
restore-object \
--bucket BUCKET-NAME \
--key KEY \
--restore-request GlacierJobParameters={"Tier"="Standard"}
Run this to check on status
sh
aws s3api \
head-object \
--bucket BUCKET-NAME \
--key KEY
ongoing-request will equal false when the data is ready to be retrieved
{
"AcceptRanges": "bytes",
"Restore": "ongoing-request=\"true\"",
"ArchiveStatus": "ARCHIVE_ACCESS",
"LastModified": "Thu, 01 Apr 2021 11:24:32 GMT",
"ContentLength": 4438197,
"ETag": "\"473ca4d8ad6889a90544f6acff916d31\"",
"ContentType": "text/csv",
"Metadata": {},
"StorageClass": "INTELLIGENT_TIERING"
}
KEY is the unique object identifier for the file you would like to restore. It can be found by clicking on the file in the console so that it shows the Object Overview. It resembles a path with folders even though S3 uses object storage. e.g. projects/PROJECTNAME/workspace/metadata/BATCHNAME/metadata.json
- For restoring a whole folder, use the restore_intelligent.py script. See the comments in the script for notes on retrieval cost.
Slack discussions
https://broadinstitute.slack.com/archives/C3QFX04P7/p1627496601111300
We've now had some data in Intelligent Tiering long enough that it needs to be restored! Unfortunately, because of the way object stores work, while you can go into the AWS console and restore one file with a point and click, you can't do that with 'folders', because 'folders' in AWS aren't real. Our previous Glacier restore scripts a) were configured to only the file types we typically Glaciered (md5 or .tgz) b) wouldn't work directly out of the box even so because Intelligent Tiering doesn't restore for just X days and c) weren't super full-featured in terms of only letting us grab subsets of things anyway. I've added a new restoration script to our imaging-backup-scripts repo; right now it only supports Intelligent Tiering restoration but if we think we want to in the future it could pretty easily add more features and/or get it to work on Glacier too. https://github.com/broadinstitute/imaging-backup-scripts/blob/master/restore_intelligent.py
https://broadinstitute.slack.com/archives/C3QFX04P7/p1627496974114300
You'll want to do this the night before you need to access any files that have not been used by anyone on AWS in >3 months, since restoration can "on average" take 3-5 hours; if you only need a handful of files you can use the expedited retrieval option, which takes only a few minutes, but in that case you likely want to just use the console anyway. Expedited retrieval is $300/plate for CellPainting data (vs 0 in standard), so please do use Standard for large data sets unless there is a very good reason not to!
https://broadinstitute.slack.com/archives/C3QFX04P7/p1627498625115200?thread_ts=1627496601.111300&cid=C3QFX04P7
[A]s a performance test [I restored] a plate that is 2300 files (aka about 10% the size of a "normal" plate) the restoration request [script] took about 8 minutes in total to run. So if you need to restore many plates, build in time for that [for the restoration request script to run BEFORE the 3-5 hours the restores will take], OR consider using something like parallel to execute the script for each of your many plates.
Owner
- Name: Broad Institute
- Login: broadinstitute
- Kind: organization
- Location: Cambridge, MA
- Website: http://www.broadinstitute.org/
- Twitter: broadinstitute
- Repositories: 1,083
- Profile: https://github.com/broadinstitute
Broad Institute of MIT and Harvard
GitHub Events
Total
- Delete event: 1
- Push event: 1
- Pull request event: 2
- Create event: 1
Last Year
- Delete event: 1
- Push event: 1
- Pull request event: 2
- Create event: 1
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Shantanu Singh | s****h@b****g | 118 |
| Beth Cimini | b****7 | 4 |
| Ubuntu | u****u@i****l | 3 |
| hkhawar | 3****r | 1 |
| gwaygenomics | g****y@g****m | 1 |
| John Arevalo | j****o@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 12
- Total pull requests: 13
- Average time to close issues: about 1 month
- Average time to close pull requests: 3 months
- Total issue authors: 4
- Total pull request authors: 6
- Average comments per issue: 2.58
- Average comments per pull request: 1.38
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- shntnu (5)
- bethac07 (4)
- ErinWeisbart (2)
- gwaybio (1)
Pull Request Authors
- shntnu (9)
- gwaybio (1)
- bethac07 (1)
- hkhawar (1)
- johnarevalo (1)
- ErinWeisbart (1)