0
votes

I've got many files uploaded at different times on Google Nearline and Coldline storage. Anything deleted < 30/90 days will get a surcharge. How do I check the age of the files I want to delete?

Been using gsutil thus far.

1

1 Answers

0
votes

gsutil is a fine way to check the age of the files. You can also use the API in a language of your choice (see Google Cloud Storage client libraries).

Note that the surcharge is equivalent to the storage cost of the object for the first 30/90 days for Nearline/Coldline, respectively. If you intend to delete an already-existing file before it reaches that age, it's not any more expensive to delete it now than it would be to wait until it was 30/90 days old and then delete it.

Really, the intended age of the file needs to be considered when you decide to store it in the first place. If you know you will delete it soon, a regional bucket is more appropriate.