Enable Object Lock or a Legal Hold on an Existing Bucket
    • Dark
      Light

    Enable Object Lock or a Legal Hold on an Existing Bucket

    • Dark
      Light

    Article Summary

    Backblaze B2 Cloud Storage Object Lock allows you to make your data immutable by preventing a file from being modified or deleted for a defined period of time. When configured, Default Bucket Retention applies Object Lock for a specified retention period on files that you upload or copy into a bucket.

    By default, Object Lock is disabled for a bucket.

    Backblaze B2 Cloud Storage Object Lock can protect files from deletion with a Legal Hold, which is not bound by a predetermined expiration date. Legal Hold protections are configured separately from governance- or compliance-mode retention settings.

    A Legal Hold functions independently to protect Backblaze B2 files from unwanted deletion. If Legal Hold settings are active for a given file, then that file is protected from being deleted.

    You can enable Object Lock or Legal Hold when you create a bucket or on a pre-existing bucket.

    For information about how to apply Default Bucket Retention using the Native API, click here.

    For information about how to apply Default Bucket Retention using the S3-Compatible API, click here.

    Enable Object Lock

    1. Sign in to your Backblaze account.
    2. In the left navigation menu under B2 Cloud Storage, click Buckets.
    3. For the bucket that you want to make immutable, click Object Lock: Disabled.
    4. Select Enable Object Lock on this bucket.
      Object Lock is enabled on the bucket, but you must set a default bucket retention period before your files are immutable.
    5. For the bucket you just enabled for Object Lock, click Object Lock: Enabled.
    6. Enter the number of days (1-3,000) to prevent files in the bucket from being deleted or modified.
    7. Click Save changes.
    8. To verify whether a file has Object Lock enabled or to determine the retention period, click Browse Files, select the bucket, and click the information icon for the file.
      Compliance Mode is displayed with the Object Lock expiration date.

    Before you begin: To apply a Legal Hold on a file, you must enable Object Lock on a bucket.

    1. Sign in to your Backblaze account.
    2. In the left navigation menu under B2 Cloud Storage, click Browse Files.
    3. Select the bucket that contains the file that you want to enable for a Legal Hold.
    4. Click the information icon next to the file.
    5. In the Legal Hold field, click Enable.
    6. To disable a Legal Hold, click Disable.
    7. Click Close.

    Was this article helpful?