ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 2,591
You can now use bucket locks to set retention policies on your R2 buckets (or specific prefixes within your buckets) for a specified period — or indefinitely. This can help ensure compliance by protecting important data from accidental or malicious deletion.
Locks give you a few ways to ensure your objects are retained (not deleted or overwritten). You can:
Buckets can have up to 1,000 bucket lock rules. Each rule specifies which objects it covers (via prefix) and how long those objects must remain retained.
Here are a couple of examples showing how you can configure bucket lock rules using Wrangler:
For more information on bucket locks and how to set retention policies for objects in your R2 buckets, refer to our documentation.
Continue reading...
Locks give you a few ways to ensure your objects are retained (not deleted or overwritten). You can:
- Lock objects for a specific duration, for example 90 days.
- Lock objects until a certain date, for example January 1, 2030.
- Lock objects indefinitely, until the lock is explicitly removed.
Buckets can have up to 1,000 bucket lock rules. Each rule specifies which objects it covers (via prefix) and how long those objects must remain retained.
Here are a couple of examples showing how you can configure bucket lock rules using Wrangler:
Ensure all objects in a bucket are retained for at least 180 days
https://developers.cloudflare.com/c...n-a-bucket-are-retained-for-at-least-180-daysnpx wrangler r2 bucket lock add <bucket> --name 180-days-all --retention-days 180Prevent deletion or overwriting of all logs indefinitely (via prefix)
https://developers.cloudflare.com/c...erwriting-of-all-logs-indefinitely-via-prefixnpx wrangler r2 bucket lock add <bucket> --name indefinite-logs --prefix logs/ --retention-indefiniteFor more information on bucket locks and how to set retention policies for objects in your R2 buckets, refer to our documentation.
Continue reading...