I am writing to inquire about the possibility of accessing logs that are older than one month. Currently, we can only view logs that are up to one month old, but we would like to retain logs for the past 12 months for our records.
Is it possible to obtain these older logs? If so, I would appreciate information regarding any associated costs. Additionally, our account is currently on the Basic support plan and unable to create a support case. Any guidance you can provide would be greatly appreciated.
How to Retain Logs for 12 Months?
Since you need logs beyond one month, you have a few options:
1. Upgrade Log Retention Using Log Buckets
You can create a custom log bucket with a 12-month retention policy.
Logs need to be routed to this bucket before they expire.
Steps:
Go to Cloud Logging → Log Router
Create a new log bucket
Set retention to 12 months
Update your log sinks to route logs to this bucket.
2.Export Logs to Cloud Storage, BigQuery, or Pub/Sub
If the logs are already deleted, you cannot retrieve them.
To store logs long-term, export them to:
Cloud Storage (for raw logs, cheaper storage).
BigQuery (for querying logs over time).
Pub/Sub (for streaming logs to other services).
3. Support Plan Limitation
You can try asking in the GCP Community Forum or consider upgrading to a Standard or Enhanced support plan.
Cost Considerations
Storing logs in Cloud Logging beyond default retention incurs additional storage costs.
Exporting to Cloud Storage (Coldline/Archive storage) is the most cost-effective for long-term retention.
Thanks,
Darwin Vinoth.
Linkedin