File Lock / Object Lock is a feature that allows Backblaze B2 customers to make data immutable by preventing a file from being modified or deleted for a defined period of time. Object Lock Legal Hold also prevents a file from being changed or deleted, but the immutability does not have a defined retention period - a file is immutable until Object Lock Legal Hold is removed.
This article covers how Object Lock Legal Hold may be applied and removed for a file through the Backblaze web application. For information on how to apply Object Lock Legal Hold via API, visit this page. Default Bucket Retention is explained here .
A prerequisite for applying Object Lock Legal Hold on a file is that Object Lock is enabled for a bucket. Enabling Object Lock for a bucket only may be done at bucket creation or on an existing bucket.
- By default, Object Lock is disabled for a bucket.
- Once Object Lock is enabled for a bucket, files in the bucket are not immutable - a Default Bucket Retention period must be set first. For more information on Default Bucket Retention, read here .
Object Lock Legal Hold may only be applied at the individual file level, i.e. a way to apply it for multiple files at once is not possible. To apply Object Lock Legal Hold, go to Browse Files in the web application and click the information icon for the file.
On the Details modal, click the Enable button for the Legal Hold field.
Remember that once Object Lock Legal Hold has been applied, the file cannot be deleted until Legal Hold has been disabled.