Modifying a Deletion Policy

This section describes how to modify a deletion policy.

Procedure

  1. Choose Resources > Dataflow > SmartTier > Deletion Policy.
  2. Select a desired account from the Account drop-down list in the upper left corner.
  3. Select a desired file directory from the list on the left. Deletion policies created for it are displayed in the function pane on the right. Click More on the right of a desired deletion policy and select Modify.

    The Modify Deletion Policy page is displayed.

  4. Click the Recycle Bin switch to enable or disable the recycle bin for the deletion policy.

    • This function takes effect only when the recycle bin function is enabled for the selected namespace.
    • After the recycle bin is enabled, deleted files are moved to the recycle bin by default in the namespace where the deletion policy takes effect.

  5. Modify the filtering policy of the deletion policy.

    Possible values are By file name, By file size, By file operation time, and By user or user group.

    • By file name

      Select Including or Excluding in File Name Filtering to determine whether files with specified names are included or excluded in the policy. Then, specify the file names to be filtered for or filtered.

      • In the text box, 1 to 1023 characters can be entered.
      • Wildcard (*) can match any character. The following formats are supported: example, *, *example*, *example, example*, and example*example.
      • Multiple file names are separated using commas (,).
    • By file size

      Specify the size of files to be filtered for.

    • By file operation time

      Specify a specific operation time. Possible options are crtime, mtime, ctime, and atime.

      • crtime: indicates the file creation time.
      • mtime: indicates the file modification time.
      • ctime: indicates the file property modification time.
      • atime: indicates the last file access time.

        If the object protocol is enabled for the selected namespace, the crtime parameter is not supported.

    • By user or user group

      Select the type of the desired user or user group from the User or User Group Type drop-down list and then select Including or Excluding in User Name Filtering to determine whether files of the specified user or user group are included or excluded in the policy.

      • If you select LDAP domain user, LDAP domain user group, NIS domain user, or NIS domain user group in User or User Group Type, specify the user or user group name in Username or User Group Name.
      • If you select Local UNIX authentication user or Local UNIX authentication user group, click Select next to Username or User Group Name. On the Local UNIX Authentication User or Local UNIX Authentication User Group page that is displayed, select the desired user or user group and click OK.
    • By prefix

      Specify a specific prefix.

    • By tag

      Specify a specific tag. You can click to add multiple tags.

    • If the object service is disabled for the selected namespace, possible options of Filter Policy include By file name, By file size, By file operation time, and By user or user group.
    • If the object service is enabled for the selected namespace, possible options of Filter Policy include By file name, By file operation time, By prefix, and By tag.

  6. If the object service is enabled for the selected namespace, set Object Expiration Policy.

    Table 1 describes related parameters.

    Table 1 Object expiration policy parameters

    Parameter

    Description

    Current Version

    Expiration policy of objects of the current version. Possible options are By days after creation and By specified date.

    • By days after creation

      Objects of the current version will be deleted after being created for the specified number of days.

    • By specified date
      • If the specified date is earlier than or is the current date, objects of the current version uploaded earlier than the specified date will be deleted.
      • If the specified date is later than the current date, objects of the current version uploaded earlier than the specified date will be deleted after the specified date is reached. This option applies to policies whose execution mode is Periodical.
    • Delete expired object delete markers

      If you select Delete expired object delete markers, you can determine whether to delete the delete markers of objects without historical versions.

      • If you select Yes, the delete markers of objects without historical versions will be deleted.
      • If you select No, this setting does not affect the current version and can be queried through the S3 bucket life cycle interface.

    Noncurrent Version

    An object will be deleted after it becomes a non-current version for the specified number of days.

    The deletion policy takes effect for files that meet both the filtering policy and object expiration policy.

  7. Click OK.