Updated on 2025-06-20 GMT+08:00

Configuring WORM Retention

You can determine whether to enable WORM when creating a bucket. For details, see Creating a Bucket. When creating a bucket, if you enable WORM, you can continue to configure WORM after the bucket is created; if you do not enable it, you are not allowed to enable or configure it for that bucket later.

The following describes how to configure WORM retention after you create a bucket with WORM enabled.

Prerequisites

You have enabled WORM for the bucket when you create it.

Configuring WORM for a Bucket

  1. In the bucket list, click the bucket you want to operate. The Overview page is displayed.
  2. In the Basic Configurations area, click WORM Retention. The Configure WORM Retention dialog box is displayed.
  3. Choose Configure. Keep the default Compliance retention mode and specify a default retention period.

    • Only the compliance retention mode is currently supported. In this mode, no users can delete protected object versions or change their retention mode during the specified retention period.
    • During the specified default retention period, OBS prevents WORM-protected object versions from being deleted. You can configure a retention period in either days (from 1 to 36500) or years (from 1 to 100). The upper limit is 100 years.
    • When you upload an object to a WORM-protected bucket, the object inherits the WORM retention from the bucket by default. You can also configure a different WORM retention for the object under advanced settings. If both a bucket-level and object-level WORM retention policy are applied to an object, the object-level retention policy will be used.

  4. Click OK.

Skipping the WORM Retention Configuration

  1. In the bucket list, click the bucket you want to operate. The Overview page is displayed.
  2. In the Basic Configurations area, click WORM Retention. The Configure WORM Retention dialog box is displayed.
  3. Choose Skip.
  4. Click OK.

Extending the Retention Period

After WORM is configured for an object, you can go to the object details page and extend the retention period of an object version on the Versions page. Before the specified date, OBS prevents protected object versions from being deleted.

  1. In the bucket list, click the bucket you want to operate. The Overview page is displayed.
  2. In the navigation pane, choose Objects.
  3. In the object list, click the object you want to go to the object details page.
  4. On the Versions tab page, view all versions of the object.
  5. Locate the object version for which you want to extend the retention period, choose Extend Retention Period, and select a date.

    A retention period can only be extended, but not shortened.

    Assume that an object version was configured to be protected until March 30, 2023. If you want to extend the retention period on March 1, 2023, you can extend it to March 31, 2023 or a later date. If you extend the retention period on April 1, 2023, you can extend it to the current day (April 1, 2023) or a later date. If the current day is used, the object version will no longer be protected by WORM after 24:00 on that day.

Related Operations

When uploading an object, configure a retention policy for the object. For details, see Uploading an Object.