Options for controlling data lifecycles Stay organized with collections Save and categorize content based on your preferences.
Cloud Storage has features that help manage your objects'storage classes:
Object Lifecycle Management can be configured for a bucket to give youmore automated control over moving objects to colder storage classes. When youdefine a lifecycle configuration, Cloud Storage performs a specifiedaction, such as setting a colder storage class for an object, only if theobject meets your criteria.
Autoclass can be enabled on a bucket, which lets Cloud Storagemanage the storage classes of objects in the bucket automatically.
If you are concerned that your application software or users might erroneouslydelete or replace objects at some point, Cloud Storage also hasfeatures that help you protect your data:
Soft delete provides default bucket-levelprotection for your data from accidental or malicious deletion by preservingall recently deleted objects for a specified period of time. You can restorethe deleted objects within this duration. For more information on how torestore soft-deleted objects, seeUse soft-deleted objects.
Bucket Lock: A retention policy that specifies a retention periodcan beplaced on a bucket. Each object in the bucket must reach thespecified age before it can be deleted or replaced.
Object Retention Lock: A retention configuration that specifies aretain-until date and time can beset for an individual object. Theobject cannot be deleted or replaced until after the specified date and time.
Anobject hold can beplaced on individual objects to preventanyone from deleting or replacing the object until the hold is removed.
Object Versioning can be enabled on a bucket in orderto retain older versions of objects. When thelive version of an object isdeleted or replaced, it becomesnoncurrent if versioning is enabled on thebucket. If you accidentally delete a live object version, you canrestore the noncurrent version of it back to the live version.
Caution: Object Versioningdoes not protect your data if youdelete the entire bucket.Object Versioning increases storage costs, but this can be partiallymitigated by configuring Object Lifecycle Management to delete olderobject versions. For one possible setup, see the lifecycle configurationexample fordeleting objects.
Object Lifecycle Management can be configured for a bucket to giveyou more automated control over deleting objects. When you define a lifecycleconfiguration, Cloud Storage performs a specified action, such asdeleting an object, only if the object meets your criteria.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.