Stay organized with collections
Save and categorize content based on your preferences.
If you are concerned that your application software or users might erroneously
delete or replace objects at some point, Cloud Storage has features
that help you protect your data:
Soft delete provides default bucket-level
protection for your data from accidental or malicious deletion by preserving
all recently deleted objects for a specified period of time. You can restore
the deleted objects within this duration. For more information on how to
restore soft-deleted objects, see Use soft-deleted objects.
Bucket Lock: A retention policy that specifies a retention period
can be placed on a bucket. Each object in the bucket must reach the
specified age before it can be deleted or replaced.
Object Retention Lock: A retention configuration that specifies a
retain-until date and time can be set for an individual object. The
object cannot be deleted or replaced until after the specified date and time.
Object Versioning can be enabled on a bucket in order
to retain older versions of objects. When the live version of an object is
deleted or replaced, it becomes noncurrent if versioning is enabled on the
bucket. If you accidentally delete a live object version, you can
restore the noncurrent version of it back to the live version.
Object Versioning increases storage costs, but this can be partially
mitigated by configuring Object Lifecycle Management to delete older
object versions. For one possible setup, see the lifecycle configuration
example for deleting objects.
Object Lifecycle Management can be configured for a bucket to give
you more automated control over deleting objects. When you define a lifecycle
configuration, Cloud Storage performs a specified action, such as
deleting an object, only if the object meets your criteria.
Cloud Storage also has features that help manage your objects'
storage classes:
Object Lifecycle Management can be configured for a bucket to give you
more automated control over moving objects to colder storage classes. When you
define a lifecycle configuration, Cloud Storage performs a specified
action, such as setting a colder storage class for an object, only if the
object meets your criteria.
Autoclass can be enabled on a bucket, which lets Cloud Storage
manage the storage classes of objects in the bucket automatically.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Options for controlling data lifecycles\n\nIf you are concerned that your application software or users might erroneously\ndelete or replace objects at some point, Cloud Storage has features\nthat help you protect your data:\n\n- [**Soft delete**](/storage/docs/soft-delete) provides default bucket-level\n protection for your data from accidental or malicious deletion by preserving\n all recently deleted objects for a specified period of time. You can restore\n the deleted objects within this duration. For more information on how to\n restore soft-deleted objects, see [Use soft-deleted objects](/storage/docs/use-soft-deleted-objects).\n\n- [**Bucket Lock**](/storage/docs/bucket-lock): A retention policy that specifies a retention period\n can be [placed on a bucket](/storage/docs/using-bucket-lock#set-policy). Each object in the bucket must reach the\n specified age before it can be deleted or replaced.\n\n- [**Object Retention Lock**](/storage/docs/object-lock): A retention configuration that specifies a\n retain-until date and time can be [set for an individual object](/storage/docs/using-object-lock). The\n object cannot be deleted or replaced until after the specified date and time.\n\n- An [**object hold**](/storage/docs/object-holds) can be [placed on individual objects](/storage/docs/holding-objects#set-object-hold) to prevent\n anyone from deleting or replacing the object until the hold is removed.\n\n- [**Object Versioning**](/storage/docs/object-versioning) can be enabled on a bucket in order\n to retain older versions of objects. When the *live* version of an object is\n deleted or replaced, it becomes *noncurrent* if versioning is enabled on the\n bucket. If you accidentally delete a live object version, you can\n [restore the noncurrent version](/storage/docs/using-versioned-objects#restore) of it back to the live version.\n\n | **Caution:** Object Versioning **does not** protect your data if you [delete the entire bucket](/storage/docs/deleting-buckets).\n\n Object Versioning increases storage costs, but this can be partially\n mitigated by configuring [Object Lifecycle Management](/storage/docs/lifecycle) to delete older\n object versions. For one possible setup, see the lifecycle configuration\n example for [deleting objects](/storage/docs/lifecycle-configurations#deletion-example).\n- [**Object Lifecycle Management**](/storage/docs/lifecycle) can be configured for a bucket to give\n you more automated control over deleting objects. When you define a lifecycle\n configuration, Cloud Storage performs a specified action, such as\n deleting an object, only if the object meets your criteria.\n\nCloud Storage also has features that help manage your objects'\n[storage classes](/storage/docs/storage-classes):\n\n- [Object Lifecycle Management](/storage/docs/lifecycle) can be configured for a bucket to give you\n more automated control over moving objects to colder storage classes. When you\n define a lifecycle configuration, Cloud Storage performs a specified\n action, such as setting a colder storage class for an object, only if the\n object meets your criteria.\n\n- [Autoclass](/storage/docs/autoclass) can be enabled on a bucket, which lets Cloud Storage\n manage the storage classes of objects in the bucket automatically."]]