During it’s lifetime, a keep collection can be in various states. These states are persisted, expiring, trashed and permanently deleted.
A collection is expiring when it has a trash_at time in the future. An expiring collection can be accessed as normal, but is scheduled to be trashed automatically at the trash_at time.
A collection is trashed when it has a trash_at time in the past. The is_trashed attribute will also be “true”. The delete operation immediately puts the collection in the trash by setting the trash_at time to “now”. Once trashed, the collection is no longer readable through normal data access APIs. The collection will have delete_at set to some time in the future. The trashed collection is recoverable until the delete_at time passes, at which point the collection is permanently deleted.
This tutorial assumes that you are logged into an Arvados VM instance (instructions for Webshell or Unix or Windows) or you have installed the Arvados FUSE Driver and Python SDK on your workstation and have a working environment.
As listed above the attributes that are used to manage a collection lifecycle are it’s is_trashed, trash_at, and delete_at. The table below lists the values of these attributes and how they influence the state of a collection and it’s accessibility.
|collection state||is_trashed||trash_at||delete_at||get||list||list?include_trash=true||can be modified|
|trashed collection||true||past||future||no||no||yes||only is_trashed, trash_at and delete_at attribtues|
A collection can be deleted using either the arv command line tool or the workbench.
arv collection delete --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
To trash a collection using workbench, go to the Data collections tab in the project, and use the trash icon for this collection row.
A collection can be un-trashed / recovered using either the arv command line tool or the workbench.
You can list the trashed collections using the list command.
arv collection list --include-trash=true --filters '[["is_trashed", "=", "true"]]'
You can then untrash a particular collection using arv using it’s uuid.
arv collection untrash --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
To untrash a collection using workbench, go to trash page on workbench by clicking on the “Trash” icon in the top navigation in workbench and use the recycle icon or selection dropdown option.
The content of this documentation is licensed under the
Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.