How to archive and retrieve 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`  

Similar to deletion, archival 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 123456$ bs unarchive dataset -i ds.123`  

Note that 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  

For any feedback or questions regarding this article (Illumina Knowledge Article #5447), contact Illumina Technical Support techsupport@illumina.com.

Last updated

© 2023 Illumina, Inc. All rights reserved. All trademarks are the property of Illumina, Inc. or their respective owners. Trademark information: illumina.com/company/legal.html. Privacy policy: illumina.com/company/legal/privacy.html