Reputation: 11
I need to extract the data that was stored in Logs Storage Bucket to store in Cloud Storage.
I know it is possible to perform the storage route, but it is only for new data. I need to extract the data already stored for some time.
Upvotes: 1
Views: 1227
Reputation: 1279
There is an experimental feature that enables you to export historical data to Cloud Storage, please see the Copying log entries documentation. Please also be advised that this feature is still on its preview stage. Below are the summarized steps for the process:
gcloud logging buckets list
to get relevant information to use in future commandsgcloud alpha logging copy <LOGGING_BUCKET_ID> <CLOUD_STORAGE_BUCKET_NAME> --location= --log-filter= --project=<PROJECT_ID>
After the operation finishes, the historical data for the logs will be in the storage of your choice. The operation results can take some time depending on the size or quantity of the log data.
Upvotes: 1