Enable and Manage Lock Features
    • Dark
      Light

    Enable and Manage Lock Features

    • Dark
      Light

    Article summary

    This feature is currently in Private Preview.

    For more information about getting started, see Manage B2 Cloud Storage at Scale: Enterprise Web Console.
    For questions after implementation, contact the Product Team.

    You can enable lock features when you create a bucket and then configure those settings after the bucket is created.

    Object Lock Retention Modes

    Object Lock supports two retention modes that provide different levels of protection for object versions:

    • Compliance mode
    • Governance mode

    Compliance Mode

    In compliance mode, a protected object version cannot be overwritten or deleted by any user, including the root user of the account. When an object is locked in compliance mode:

    • The retention mode cannot be changed.
    • The retention period cannot be shortened.
    • The object remains protected for the full duration of the retention period.

    Governance Mode

    In governance mode, users without special permissions cannot overwrite or delete an object version or modify its lock settings. Governance mode allows you to:

    • Prevent most users from deleting protected objects.
    • Grant specific users permission to bypass governance protections if needed.
    • Test retention settings before enforcing them with compliance mode.

    You can apply a Legal Hold to an object version to prevent it from being overwritten or deleted. Unlike a retention period, a Legal Hold has no set expiration and stays in effect until manually removed.

    • Legal Holds are independent of retention periods.
    • Both protections can exist on the same object version.
    • If a retention period expires but a Legal Hold is active, the object remains protected.
    • Removing a Legal Hold does not affect an active retention period.

    For more information about using lock features for s3 objects, see Locking objects with Object Lock.

    Configure Lock Features on a Bucket

    1. Sign in to your Backblaze organization.
    2. In the left navigation menu, select Buckets.
    3. Click the bucket name.
    4. Click Settings.
    5. Enable Lock Features.
    6. To automatically lock objects for a fixed duration, enable Object Lock.
      1. Select a lock mode:
        • Governance
        • Compliance
          After you save this setting, you cannot change the lock mode and duration.
      2. Enter the number of days (1-3,000) to prevent files in the bucket from being deleted or modified.

        You must enter a default bucket retention period before your files are immutable.

    7. Click Save.

    Configure Lock Features on an Object

    You can add Object Lock or a Legal Hold on an unlocked object.

    1. In the left navigation menu, select Buckets.
    2. Click the bucket name, and select the Objects tab.
    3. Click the object name.
    4. Click(Manage Lock).
    5. To prevent changes or deletion for an indefinite period, enable Legal Hold.
    6. To automatically lock objects for a fixed duration, enable Object Lock.
      1. Select a lock mode:
        • Governance
        • Compliance
          After you save this setting, you cannot change the lock mode and duration.
      2. Enter the number of days (1–3,000) to prevent files in the bucket from being deleted or modified.

        You must enter a default bucket retention period before your files are immutable.

    7. Click Save.


    Was this article helpful?