Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

gcloud logging copy

Hello,

I would like to export some logs from _Default log storage to a GCS, but it's not working

gcloud logging copy _Default MY_BUCKET --location=global --log-filter='resource.type = ("cloud_run_revision" OR "http_load_balancer") ' --project=MY_PROJECT

But I am getting :

ERROR: (gcloud.logging.copy) NOT_FOUND: Bucket `_Default` does not exist

How can I find the ID of the _Default storage if it's not _Default

Any idea ?

Thx

 

0 1 1,147
1 REPLY 1

Greetings @gnubibi,

Welcome to the Google Cloud Community!

According to the gcloud logging copy documentation, try enclosing your query inside a single/double quotation mark. 

You can also look into Copying Log Entries. It provides a guide on how to manually copy log entries that are already stored in Cloud Logging buckets to Cloud Storage buckets. It also utilizes the gcloud alpha logging copy command.

If the above options don't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!