Lifecycle DryRun is a simulation capability provided by OSS lifecycle management. Before you add, modify, disable, or delete a lifecycle rule, you can use DryRun to simulate the data trend of a bucket over a future period, so that you can determine whether the data trend caused by the lifecycle rules meets your expectations, thereby reducing the risk of accidental data deletion or unexpected tiering caused by improper rule configuration. In addition, during operations such as data migration and data replication, you can simulate all lifecycle rules of the current bucket to identify potential risks.
This feature is available by whitelist. To use it, contact technical support. It is supported only in the following regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore, Indonesia (Jakarta), and Germany (Frankfurt).
How it works
OSS lifecycle management can automatically tier (hot-to-cold) or delete objects based on the rules you configure, helping reduce storage costs. However, when rules are added, modified, or deleted, chain reactions with existing rules may occur, resulting in unexpected data tiering or deletion. DryRun performs a simulation based on an inventory snapshot generated for the bucket at a specific point in time, combined with all lifecycle rules currently configured for the bucket, to predict the capacity changes of each storage class and the data deletion trend over a future period.
Global simulation: A newly added or changed rule may interact with existing rules. Therefore, DryRun performs a comprehensive simulation of all rules at the granularity of the entire bucket, rather than simulating a single
Prefixor a single rule.Simulation only, no execution: DryRun does not modify any object attributes (such as
LastModifiedTimeandLastAccessTime), and does not actually delete or tier data. Lifecycle rule changes remain in a pending state by default and must be manually applied by you based on the report.Snapshot-based prediction: The simulation is based on the current snapshot and cannot predict the future access time or modification time of objects. The results differ from actual execution and are for reference only. Therefore, DryRun is not recommended for auditing or precise cost estimation.
Scenarios
Simulate data before configuring a new lifecycle rule: Before adding a tiering or deletion rule, run DryRun first to confirm that the combined effect of the new rule and existing rules meets your expectations, and then apply the rule.
Evaluate before changing a rule: Before modifying, disabling, or deleting an existing rule, use DryRun to predict the overall effect after the change to avoid unexpected impact. If the result meets your expectations, you can then decide whether to apply the modification, disabling, or deletion of the lifecycle rule.
Troubleshoot in data-change scenarios: When a bucket is undergoing operations such as data migration, data tagging, or cross-region/same-region replication, newly written or synchronized data may match existing lifecycle rules. You can run DryRun to identify potential risks in advance.
Considerations
Bucket granularity: Only all lifecycle rules of an entire bucket can be simulated. Simulating a specific
Prefixor a single rule is not supported. For example, if you add a lifecycle rule to a bucket, DryRun does not simulate only that rule. Instead, it performs a global simulation that combines all existing lifecycle rules of the bucket with the newly added rule, and the report generated by DryRun is also a global simulation prediction based on all rules.Bucket storage class restriction: The DryRun report and inventory files must be stored in a bucket whose default storage class is Standard or Infrequent Access (IA). Otherwise, the task cannot run and no report can be generated.
Dependency on the inventory feature: When DryRun is started, an inventory is automatically created, and the inventory is delivered together with the DryRun report to the bucket you specify. Inventory scanning and delivery take time, and the larger the data scale, the longer it takes. Therefore, there is a time gap between configuration and report generation.
Billing: The DryRun feature itself is not billed separately, but each execution incurs the following associated fees: inventory request fees, storage fees for the DryRun report and inventory files, and the request fees and outbound traffic fees over the Internet incurred when accessing the inventory files and DryRun report files.
Time consumption: A DryRun report usually takes an additional several tens of minutes to several hours on top of the inventory generation time, depending on the number of files in the bucket.
Versioning: The report does not distinguish between the current version and previous versions; the two are combined in the report.
One-time task: DryRun is a one-time task and can be triggered multiple times for the same bucket. When it is no longer needed, you can delete the report and inventory files yourself.
Enable Lifecycle DryRun
DryRun can be triggered when you change lifecycle rules, or triggered manually without changing rules.
Method 1: Execute when changing lifecycle rules
When you create, edit, delete, or disable a lifecycle rule, the system guides you to choose whether to run DryRun.
Go to the Bucket list, click the target bucket, and in the left-side navigation pane, choose Data Management > Lifecycle.
On the Lifecycle tab, create, edit, delete, or disable a rule, and then click OK.
In the DryRun recommended dialog box that appears, select Use DryRun to simulate the future capacity trend and reduce the probability of misconfiguration. If you do not need to simulate, you can select Do not use DryRun and directly create/change the current lifecycle rule.
Complete Configure DryRun as guided: set the storage path for the inventory and report, complete authorization, and confirm the lifecycle rules to apply this time.
Set the bucket name and bucket path for Store inventory and DryRun report to. The inventory rule name is automatically generated by the system, and OSS creates the inventory rule and generates the inventory file based on the default template. If the specified bucket path does not exist, OSS creates it automatically. To store to the bucket root directory, leave the bucket path empty.
Set the authorization role. Select Default quick authorization. On first use, click One-click authorization to create and authorize the AliyunOSSBatchOperationJobRole role (this role supports all batch operations under the current account). You can also select Custom authorization. When done, click Next.
On the Apply lifecycle rules tab, confirm all lifecycle rules that participate in this DryRun, and then click Confirm and create DryRun task.
The rules added or changed this time are in a pending state and are used only for DryRun simulation; they do not affect the normal execution of existing rules. After the DryRun task is complete, view the report to confirm that there is no risk, and then manually apply the corresponding rules.
If you choose to use DryRun, the rules added or changed this time are not actually executed until you manually apply them.
Method 2: Manually trigger DryRun
If you have not changed the lifecycle rules but want to evaluate the impact of all current rules on future data, you can manually trigger DryRun.
Go to the Bucket list, click the target bucket, and in the left-side navigation pane, choose Data Management > Lifecycle.
Click the DryRun tab, and then click Configure DryRun (you can also click Configure DryRun in the prompt card at the top of the page).
Complete Configure DryRun as guided: set the storage path for the inventory and report, complete authorization, and confirm the lifecycle rules to apply this time.
Set the bucket name and bucket path for Store inventory and DryRun report to. The inventory rule name is automatically generated by the system, and OSS creates the inventory rule and generates the inventory file based on the default template. If the specified bucket path does not exist, OSS creates it automatically. To store to the bucket root directory, leave the bucket path empty.
Set the authorization role. Select Default quick authorization. On first use, click One-click authorization to create and authorize the AliyunOSSBatchOperationJobRole role (this role supports all batch operations under the current account). You can also select Custom authorization. When done, click Next.
On the Apply lifecycle rules tab, confirm all lifecycle rules that participate in this DryRun, and then click Confirm and create DryRun task.
After the task is submitted, wait for the DryRun report to be generated (approximately 48 hours), and view the report in the DryRun list.
View DryRun reports
After the DryRun task is complete, you can view the report charts or the detailed report in the DryRun list.
Report charts: View the following visual charts in the console to quickly assess the effect of rule execution.
Chart | Description |
Total storage trend | Shows the current total capacity, future total capacity, the change amount, and the change ratio. |
Estimated proportion of deleted data | Shows the proportion between the amount of data estimated to be deleted in the future and the remaining data. |
Storage by storage class | Shows the current capacity, future capacity, and change trend of storage classes such as Standard, IA, and Archive. |
Daily deletion trend | Shows the capacity of objects that are permanently deleted or marked with a delete marker each day (not cumulative). |
Detailed report: In the bucket that stores the inventory files and DryRun report, you can further view the detailed report to analyze the list of objects deleted on a specific day and the deletion reasons.