Retrieving the informaton of deleted objects/files from the bucket

21 views
Skip to first unread message

Elam Cheliyan

unread,
Feb 4, 2022, 12:36:59 PM2/4/22
to google-cloud-storage-discuss
Hi Anyone,

I wanted to know the list of deleted objects/files from the specifc bucket through the google.storage.object.delete notification. Is it possible?

Thanks & Regards
Elamcheliyan A

Sivaranjani Malli Jawaharlal

unread,
Feb 13, 2022, 1:25:28 PM2/13/22
to google-cloud-storage-discuss
Hi,

Thanks for raising this question. I believe the answer is yes. If you have audit logs enabled in your Google Cloud Storage, you can filter the delete event using google.storage.object.delete in the filter. Also, you can add other filters on Cloud Logging, like the resourceName to filter on the bucket and/or the file prefix/suffix (use the =~ for the regex expression).

You can also use gsutil ls -a gs://[BUCKET_NAME]

However, there are some additional flags, that can help you identify the archived objects. You can use the -L flag along with the -a flag. This command will give you the Archived Time for non-live versions of an object, but not for the live ones. For Example[1] but you should have object versioning enabled.


Hope this answers your question. Please let me know if you have additional questions.

Sincerely,

Sivaranjani,
Google Cloud Platform Support, Montreal

Reply all
Reply to author
Forward
0 new messages