How to archive and restore data in BaseSpace using BaseSpace Command Line Interface (CLI) commands?
Archiving runs and datasets
Use the archive command to send data to long-term storage:
$ bs archive run -i <Run ID>$ bs archive dataset -i <Dataset ID>
Use the IsArchived field to check whether runs or datasets have been archived:
# show all archived runs$ bs list runs --filter-field IsArchived --filter-term true
Archiving runs will only move the Data/ directory of run files, while InterOp and other metadata will remain accessible. For datasets, all files will be archived but metadata including any dataset attributes will remain available.
**Restoring data from the archive** To regain access to archived data, use the unarchive command:
$ bs unarchive run -i <Run ID>
$ bs unarchive dataset -i <Dataset ID>
Note: the restore process can take up to several days to complete. The IsArchived field will remain true until the data has been fully restored.
Bulk archival
As with other CLI commands, it it easy to combine archive with the list command for powerful results.
# archive all runs which are over a year old $ bs list runs --older-than 1y --terse | xargs -n1 bs archive run -i # archive all datasets in a given project $ bs list datasets --project-id 123456 --terse | xargs -n1 bs archive dataset -i
Note that all archive and unarchive actions will still follow the standard costs per transfer.
For any feedback or questions regarding this article (Illumina Knowledge Article #5447), contact Illumina Technical Support techsupport@illumina.com.
Last updated
Was this helpful?
