Google Cloud Storage lifecycle policy for file management
This page is a step-by-step guide to configuring a Google Cloud Storage lifecycle policy to delete objects, helping to keep your storage organized and to manage the data lifecycle efficiently.
Select your bucket
- Log in to the Google Cloud Console.
- In the search bar, type "cloud storage" and click Cloud Storage.
- Choose the Cloud Storage bucket where you want to create the lifecycle policy. Ensure you have the necessary permissions.
- In this bucket's dashboard, click the Lifecycle tab.
- In the Rules section, click ADD A RULE.
Add object lifecycle rule
Note
After you have added or edited a rule, it may take up to 24 hours to take effect.
Select an action
= radio button
Select Delete object.
Warning
Remember that deleted objects can't be restored unless you have enabled object versioning.
Click Continue.
Select object conditions
= checkbox
Select at least one condition. For the rule in an action to be taken, an object must match all of the specified conditions.
It is recommended to check the box labelled Custom time before.
Read more about Google's Custom-Time metadata.
Click Continue.
Click Create.