11823: document collection lifecycle
[arvados.git] / doc / user / tutorials / tutorial-keep-data-lifecycle.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Keep data lifecycle"
5 ...
6
7 During it's lifetime, a keep collection can be in various states. In addition to the two obvious states "persisted" and "permanently deleted", it can also be in "expiring" or "trashed" states.
8
9 An *expiring collection* has a *trash_at* time in the future, at which time it will be marked as trash by the system and becomes a trashed collection. Crunch-dispatch will "expire" intermediary collections during the running of a process.
10
11 A *trashed collection* has it's *is_trashed* attribute set to true. It's *trash_at* time is set to "current_time", the time at which it is marked as trash, either by the user calling a delete operation on the collection or by the system marking an expiring collection as trash. In addition, it's *delete_at* time is set to current_time plus the blobSignatureTTL. It is no longer readable through normal data access APIs.  However, it is still recoverable until it is permanently deleted at it's delete_at time.
12
13 # "*Collection lifecycle attributes*":#collection_attributes
14 # "*Deleting / trashing collections*":#delete-collection
15 # "*Recovering trashed collections*":#trash-recovery
16
17 {% include 'tutorial_expectations' %}
18
19 h2(#collection_attributes). Collection lifecycle attributes
20
21 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.
22
23 table(table table-bordered table-condensed).
24 |_. collection state|_. is_trashed|_. trash_at|_. delete_at|_. get|_. list|_. list?include_trash=true|_. can be modified|
25 |normal collection|false |null |null |yes |yes |yes |yes |
26 |expiring collection|false |future |future |yes  |yes |yes |yes |
27 |trashed collection|true |past |future |no |no |yes |only is_trashed, trash_at and delete_at attribtues|
28 |deleted collection|true|past |past |no |no |no |no |
29
30 h2(#delete-collection). Deleting / trashing collections
31
32 A collection can be deleted using either the arv command line tool or the workbench.
33
34 h3. Trashing a collection using arv command line tool
35
36 <pre>
37 arv collection delete --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
38 </pre>
39
40 h3. Trashing a collection using workbench
41
42 To trash a collection using workbench, go to the Data collections tab in the project, and use the trash icon for this collection row.
43
44 h2(#trash-recovery). Recovering trashed collections
45
46 A collection can be un-trashed / recovered using either the arv command line tool or the workbench.
47
48 h3. Un-trashing a collection using arv command line tool
49
50 You can list the trashed collections using the list command.
51
52 <pre>
53 arv collection list --include_trash=true
54 </pre>
55
56 You can then delete a particular collection using arv using it's uuid.
57
58 <pre>
59 arv collection untrash --uuid=qr1hi-4zz18-xxxxxxxxxxxxxxx
60 </pre>
61
62 h3. Trashing a collection using workbench
63
64 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.
65
66 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/trash-button-topnav.png!