Backtrace offers a retention policy mechanism to help you manage your data lifetime and storage requirements.
A retention policy consists of a set of independently applied rules. Each rule has a set of criteria and a set of actions. When all criteria are met, rule's actions are applied to the matching data. Each criterion and action offers configuration options to tweak their behavior to match your needs.
There is currently one type of criterion:
- Object age: Specifies that the matching data consists of objects that were received by the object store within a certain time period. This criterion can be set to match either greater than a certain time, or a range or times. Time is specified in seconds.
There are currently two types of actions:
- Delete: Specifies that the matching data shall be deleted. This action can delete a subset of an object's data. Currently the only subset supported is "physical". If this subset is specified, the object's data file is deleted, but not its metadata.
- Compress: Specifies that the matching data shall be compressed. This action currently has no configuration options.
Retention policies may be configured for the following contexts:
- Instance: The policy applies to all universes for the server.
- Universe: The policy applies to all projects for the universe.
- Project: The policy applies only to associated project.
Each policy operates independently. However, policies at higher levels in the hierarchy take precedent over lower level policies. For example, if an universe policy specifies that its objects are to be deleted after 90 days, but one of its project's policy is to delete them after 120 days, the universe's policy will be the effective one. If the two are reversed, then the project's policy will be the effective one.
Some commonly configured policies include:
- Compress all objects after 1 month, delete all physical object data after 3 months.
- Delete all object data after 1 year.
Configuring a Policy
To configure a policy using morgue, refer to its documentation. To configure a policy in the user interface, go to
Project Settings or
Organization Settings and click on
Retention in the left pane.