Help Center/ Scalable File Service/ User Guide/ Data Management/ Configuring a Lifecycle Rule
Updated on 2025-12-12 GMT+08:00

Configuring a Lifecycle Rule

Infrequent Access Storage

General-purpose file systems allow you to configure lifecycle rules to transition inactive files to infrequent access storage to reduce costs.

Infrequent access storage has the following advantages:
  • Simple configuration (no need to compile scripts or migrate data)

    All you need to do is configure lifecycle rules, then general-purpose file systems will automatically transition files that meet the rules to infrequent access storage. No complex or high-risk operation is involved.

  • Low costs

    Infrequent access storage saves more money than standard storage.

    For details about the billing of infrequent access storage, see Billed Items.

  • Normal data access after transition

    After files are transitioned to infrequent access storage, the content and structure of general-purpose file systems remain unchanged and applications can access such files normally. You do not need to modify applications or suspend services.

Configuring a Lifecycle Rule

You can configure lifecycle rules for a general-purpose file system or a specific directory in a file system. Files that meet the rules will be transitioned from standard storage to infrequent access storage.

You can configure up to 20 lifecycle rules for a general-purpose file system.

You can copy, enable, disable, modify, and delete lifecycle rules. Perform the following steps to create a rule:

  1. Log in to the SFS console.
  2. In the general-purpose file system list, click the name of the desired file system to go to its details page.
  3. On the Lifecycle Management tab, click Create Rule, as shown in Figure 2.

    Figure 1 Lifecycle Management
    Figure 2 Create Lifecycle Rule

  4. Configure rule parameters.

    • Status: Selecting Enable enables this rule after it is created.
    • Rule name: Enter a rule name, which can contain only letters, digits, periods (.), underscores (_), or hyphens (-).
    • Directory path: Enter the path of a directory on which the rule will be applied. If not specified, the rule will be applied to the entire file system. The path cannot start with a slash (/), contain two adjacent slashes (//), or contain the following special characters: \:*?"<>|
    • Transitioned to Infrequent Access After: defines the number of days that must pass for files to transition to infrequent access storage after their last access. There are four options: 14 days, 30 days, 60 days, and 90 days. When the specified directory is not accessed for the specified number of days, files in this directory will be transitioned to infrequent access storage.

  5. Click OK.

Replicating a Lifecycle Rule

In addition to creating lifecycle rules, you can replicate rules from other general-purpose file systems. Perform the following steps to replicate a rule:

  1. Log in to the SFS console.
  2. In the general-purpose file system list, click the name of the desired file system to go to its details page.
  3. On the Lifecycle Management tab, click Copy to open the page shown in Figure 3.

    Figure 3 Replicate Lifecycle Rule

  4. Select a replication source, which is the general-purpose file system whose lifecycle rules you want to replicate.

    • Lifecycle rules replicated from a source file system will not overwrite existing rules in the destination file system, and any rules that conflict with the existing ones will not be replicated.
    • You can remove rules that you do not want to replicate.

  5. Click OK.

Other Operations

  • Modifying a lifecycle rule: Locate the rule you want to modify and click Edit in the Operation column. For details about the rule parameters, see 4.
  • Enabling or disabling a lifecycle rule: Locate the target rule and click Enable or Disable in the Operation column.

    To batch enable lifecycle rules, ensure that all target rules are disabled. To batch disable lifecycle rules, ensure that all target rules are enabled.

    Figure 4 Disable This Lifecycle Rule
    Figure 5 Enable This Lifecycle Rule
  • Batch enabling or disabling lifecycle rules: Select the desired rules and click Enable or Disable above the rule list to perform the corresponding operation.
  • Deleting a lifecycle rule: Locate the target rule and click Delete in the Operation column. Or, click the checkbox in front of the rule name and click Delete above the rule list. You can also delete rules in a batch.
    Figure 6 Delete This Lifecycle Rule