Life Cycle Management

最近更新时间:2020-04-03 03:51:56

Life cycle management

KS3 supports in-batch deletion of Objects or in-batch conversion of Object storage types at a specific point of time or after a period of time following the Objects were last modified.

When creating a rule, users shall first select a Bucket. They can specify the rule is effective on the entire Bucket or on specific-prefixed Objects. Later on, they can set a policy to delete or convert on a specified expiry date, or after a certain number of expiry days, or on a specific date, or after certain days following the last modification of the Objects.

After creating a rule, users can enable or disable the rule.

For each Bucket, you can create up to 100 rules.

For the files uploaded by users before April 12, 2017, the storage type conversion and expiry deletion are not supported.

Description of details

- Status:

Specify the status of the rule, meaning to enable and disable the rule.

- Strategy:

The Bucket or prefix is the only criterion for KS3 to decide whether an Object is applicable to a life cycle rule. If a rule is set to the entire Bucket, then all Objects under the Bucket are applicable to the rule. If the rule is set to a prefix, then only the Objects matching this prefix under the Bucket are applicable to this rule.

For example, if a Bucket has the following Objects:

pics/dog.gif
pics/cat.gif
pics/bird.gif
docs/readme.txt

If the prefix specified by a rule is pics/, then the rule applies to the first three Objects that begin with pics/; and if the prefix is ​​docs/readme.txt, then the rule only applies to docs/readme.txt.

Note:

1. Do not start with "/" when setting a prefix; otherwise, the rule will not match any Object

2. Any two prefixes must not overlap with each other. For example, if two rules are configured for the same Bucket, one for prefix ​​pics/ and another for prefix ​​pics/program, then KS3 will return an error.

- Expiry policy

Users can specify the number of expiry days or the expiry date:

  • If the number of expiry days is specified, the data will be deleted or converted to a certain storage type as specified after the specified number of days, starting from the last day the Object was modified.

    For example: a user makes a setting on all Objects that a deletion will be performed after 3 expiry days. If Object1 is last modified at the time of 2018-08-01 18:01:26, then 3 days later, i.e., at 2018-08-05 00:00:00, the Object will be deleted; and if Object2 is last modified at the time of 2018-08-03 18:01:26, then 3 days later, i.e., at 2018-08-07 00:00:00, the Object will be deleted;

  • If an expiry date is specified, then all the Objects whose were last modified before the specified date will be operated. For example: suppose that a user sets an expiry date of 2018-01-01T00:00:00.000Z on all Objects for converting to the low-frequency storage type. If Object1 is last modified at 2017-08-01 18:01:26, it will be converted to the low-frequency storage type. If Object2 is last modified at 2018-08-02 18:01:26, it will not be converted.

Execution of rules

- Convert to low frequency storage files

Users can choose the number of expiry days or not enabling it. The rule configuration will take effect within one day. For example, if a rule is enabled at 3 pm, it will take effect at 00:00 the next day. From the time a conversion condition is met, to the time the conversion operation is triggered, there is a certain period of time needed for KS3 to complete the conversion operation, a period that is related to the number and size of Objects.

- Convert to archiving storage files

Users can choose the number of expiry days or not enabling it. The rule configuration will take effect within one day. For example, if a rule is enabled at 3 pm, it will take effect at 00:00 the next day. From the time a conversion condition is met, to the time the conversion operation is triggered, there is a certain period of time needed for KS3 to complete the conversion operation, a period that is related to the number and size of Objects.

- Expiry deletion

The rule configuration will take effect within one day. For example, if a rule is enabled at 3 pm, it will take effect at 00:00 the next day. From the time a deletion condition is met, to the time the deletion operation is triggered, there is a certain period of time needed for KS3 to complete the deletion operation, a period that is related to the number and size of Objects.

- Constraints and restrictions

  • If rules are configured to convert to low frequency storage and archiving storage, the following restrictions apply: the conversion-to-low-frequency time or date +30 <= the conversion-to-archiving time and date
  • If rules are configured to convert to low frequency storage and delete, the following restrictions apply: the conversion-to-low-frequency time or date < the deletion time and date
  • If rules are configured to convert to archiving storage and delete, the following restrictions apply: the conversion-to-archiving time or date < the deletion time and date
  • If rules are configured to convert to low frequency storage and archiving storage and delete, the following restrictions apply: the conversion-to-low-frequency time or date +30 <= the conversion-to-archiving time and date < the deletion time and date
  • If only one of the three rules is configured, there are no restrictions

- Description of fees for storage type conversion

  • The minimum storage period for low-frequency storage is 30 days. If such a file is deleted or converted earlier than 30 days, the storage cost for the remaining days of 30 days shall be paid. If longer than 30 days, no additional cost is needed.
  • The minimum storage period for archiving storage is 90 days. If such an Object is deleted earlier than 90 days, the storage cost for the remaining days of 90 days shall be paid. If longer than 90 days, no additional cost is needed.

Set the expiry deletion on the console

1. Add a rule: Bucket Settings -> Life Cycle, click Add Rule

image.png

2. Set rules

image.png

When setting the number of expiry days, the valid days shall be a positive integer;

3. Edit, delete, enable and disable rules

image.png

金山云,开启您的云计算之旅

注册有礼