# How to Retain Logs for a Year Without Breaking the Budget

> Keep a year of logs at object storage prices: Amazon S3 tier math, hot vs cold tiers, why querying in place beats rehydration, and OpenObserve setup.

Source: https://openobserve.ai/blog/log-retention-one-year/
Published: 2026-12-03
Authors: Manas Sharma
Category: Engineering
Tags: OpenObserve, Logging, Cost, AWS, Security

---

**Log retention for a year** costs least when logs live in object storage as compressed, columnar files that you can query in place. Amazon S3 Standard lists at $0.023 per GB-month. The catch is querying: if old logs must be restored or rehydrated before you can search them, low-cost storage turns into slow, expensive investigations.

## TL;DR

- **The lowest-cost place to keep a year of logs is object storage** such as Amazon S3, with logs stored as compressed Parquet files.
- **Glacier Flexible Retrieval and Deep Archive are poor fits for logs you need to search**, because they need a restore before any tool can read them.
- **Querying object storage directly is faster and simpler than archive-and-rehydrate**, since there is no second pass over data you already paid to store.
- **OpenObserve is the best option for one-year log retention**, because it keeps a full year of logs on object storage and makes all of it searchable with SQL.

## Why keep logs for a year?

Teams keep a year of logs for three reasons:

- **Compliance and audits.** Many compliance frameworks and internal security policies ask for a year of audit and access logs.
- **Security investigations.** Intrusions are often found weeks or months after they begin, and you need the logs from when they started.
- **Trend analysis.** Seasonal traffic, year-over-year comparisons, and capacity planning need more than 30 days of history.

The problem is that most log platforms price retention as if all of it were hot, indexed data. A year of logs on an indexed platform can cost many times more than the same bytes in object storage.

## How much does a year of log retention cost in object storage?

Object storage pricing depends on the storage class. These are Amazon S3 list prices:

| S3 storage class | Storage per GB-month | Retrieval per GB | First byte latency | Minimum storage duration |
|---|---|---|---|---|
| S3 Standard | $0.023 | None | Milliseconds | None |
| S3 Standard-IA | $0.0125 | $0.01 | Milliseconds | 30 days |
| S3 Glacier Instant Retrieval | $0.004 | $0.03 | Milliseconds | 90 days |
| S3 Glacier Flexible Retrieval | $0.0036 | $0.01 (standard), free (bulk) | Minutes or hours | 90 days |

(Source: AWS S3 pricing and S3 storage classes pages, US West (Oregon), November 2026) S3 Glacier Deep Archive is the lowest-cost class, with a first byte latency of hours and a 180-day minimum storage duration.

Here's what a year of logs costs at 100 GB per day. At steady state you store 365 days of data, or 36,500 GB. The figures below use the raw size as a ceiling; compressed Parquet takes far less space.

| Storage class | Monthly cost for 36,500 GB (ceiling) |
|---|---|
| S3 Standard | $839.50 |
| S3 Standard-IA | $456.25 |
| S3 Glacier Instant Retrieval | $146.00 |
| S3 Glacier Flexible Retrieval | $131.40 |

Two things to notice:

1. **Every class is inexpensive compared with indexed retention.** Even S3 Standard keeps a year of 100 GB/day logs for under $840 a month before compression.
2. **The lowest prices come with restore delays.** Glacier Flexible Retrieval and Deep Archive take minutes to hours before the first byte is readable, which rules them out for logs you want to search during an incident.

## Hot vs cold log storage tiers: what's the trade-off?

Traditional log platforms split retention into tiers:

- **Hot tier:** recent logs on fast local disks, fully indexed and searchable.
- **Warm or cold tier:** older logs on slower or lower-cost storage, often with reduced query performance.
- **Archive:** the oldest logs in object storage, not searchable until restored.

Tiering exists because indexed storage is expensive, so platforms move data off it as quickly as they can. The cost is operational: someone designs the tier policy, sizes each tier, and moves data between them. The query experience degrades as data ages, which is exactly when security and audit teams need it.

## Why is querying object storage better than log rehydration?

Many platforms keep recent logs in an index and forward everything to an archive in your bucket. Datadog, for example, writes log archives to Amazon S3, Azure Storage, or Google Cloud Storage as compressed JSON, and searching them means using rehydration or Archive Search. (Source: Datadog docs, Log Archives, November 2026)

Archive-and-rehydrate has three costs:

1. **Time.** You wait for the archive to be scanned and reloaded before you can search, usually in the middle of an investigation.
2. **Extra processing.** Rehydration is a second pass over data you already paid to ingest and archive, just to make it searchable again.
3. **Guesswork.** You have to pick the time range and filters to rehydrate before you know what you're looking for.

Querying object storage directly removes all three. The data is already in a columnar format such as Apache Parquet, so a query reads only the columns and time ranges it needs, straight from the bucket. A year-old log answers the same query as one from this morning.

## How to retain logs for a year in OpenObserve

OpenObserve is built around object storage. Ingesters convert logs to compressed Parquet files and write them to Amazon S3, Google Cloud Storage, Azure Blob Storage, MinIO, or another S3-compatible store. Queriers read those files directly and cache recent ones on local disk, so there's no manual tiering: recent and historical data live in the same place, and you query petabytes of history as easily as live logs. The [OpenObserve architecture docs](https://openobserve.ai/docs/architecture/) explain the ingest and query path.

### Step 1: Choose where your log data lives: self-hosted, Cloud, or BYOB

- **Self-hosted:** point OpenObserve at your own bucket. Retention costs whatever your object storage costs, on compressed data.
- **OpenObserve Cloud:** ingestion costs $0.50 per GB on an annual contract or $0.70 per GB pay-as-you-go. Logs include 30 days of retention, and each additional 30-day period costs $0.02 per GB, so keeping a full year adds $0.22 per GB ingested.
- **OpenObserve Cloud with BYOB:** [Bring Your Own Bucket](https://openobserve.ai/docs/administration/maintenance/storage-management/bring-your-own-bucket/) writes your telemetry to your own S3, Azure Blob, or Google Cloud Storage bucket. You pay your cloud provider for storage and keep data as long as you want. See the [BYOB announcement](/whats-new/2026-05-12-bring-your-own-bucket/).

### Step 2: Set log retention per stream

Open **Streams**, open the stream's **Stream Detail**, go to the **Configuration** tab, and set **Data Retention (days)**. Leave it empty and the stream uses the default for its type. A security audit stream can keep 365 days while a debug stream keeps 7, so you only pay for long retention where you need it.

![OpenObserve Stream Detail Configuration tab with Data Retention (days) set to 365 for an audit log stream](/assets/blog/log-retention-one-year/image1.png)

 Our [logging best practices](/blog/logging-best-practices/) cover how to decide which streams need long retention. The [Stream Details docs](https://openobserve.ai/docs/user-guide/data-processing/streams/stream-details/) list every setting.

### Step 3: Use extended retention for incident and audit time ranges

When an incident or audit makes a specific window important, open the **Extended Retention** tab in the same **Stream Detail** panel, pick the dates in **Select Date**, and apply. That time range is kept beyond the stream's normal retention, by default for 3,650 extra days, while the rest of the stream still expires on schedule.

![OpenObserve Extended Retention tab with an incident window from 1 to 3 December added, so those days are kept 3,650 days beyond the stream's normal retention](/assets/blog/log-retention-one-year/image2.png)

### Step 4: Query a year of logs with SQL, without rehydration

Search historical logs in **Logs** with the same SQL you use for today's data: no restore, no rehydration, no separate archive tool. Set the time range to **Past 52 Weeks** and run a query such as this one, which finds every role change in an audit stream:

```sql
SELECT _timestamp, user_id, action, outcome, client_ip, service_name
FROM "audit_logs"
WHERE action = 'role_change'
ORDER BY _timestamp DESC
```

![OpenObserve Logs search with the time range set to Past 52 Weeks, a SQL query filtering role_change audit events, and the matching events with the histogram](/assets/blog/log-retention-one-year/image3.png)

For an example of running logs at scale this way, see our guide to [monitoring Kubernetes logs at scale](/blog/monitor-kubernetes-logs-at-scale/).

## How much does a year of log retention cost on OpenObserve Cloud?

At 100 GB of logs per day, kept and searchable for a full year:

| Monthly line item | Calculation | Cost |
|---|---|---|
| Ingestion | 3,000 GB × $0.50 (annual contract) | $1,500 |
| Retention beyond 30 days, at steady state | 11 older 30-day periods × 3,000 GB × $0.02 | $660 |
| **Total for a searchable year** | | **$2,160** |

On pay-as-you-go ($0.70 per GB), ingestion is $2,100 a month and the total is $2,760, with the same $660 for retention.

The extended retention rate works out to $0.02 per GB for each month of history, below the S3 Standard list price per GB-month, and every byte stays searchable. Queries cost $0.01 per GB scanned. For how this compares with other billing models, see our guide to [observability pricing models](/blog/observability-pricing-models/).

## What else does OpenObserve do beyond log retention?

OpenObserve is an open-source (AGPL-3.0) observability platform, so long-term logs sit alongside the rest of your telemetry:

- **Telemetry:** logs, metrics, and traces with a service graph and service catalog, plus continuous profiles.
- **Frontend monitoring:** real user monitoring (RUM), session replay, and error tracking.
- **Synthetic monitoring:** scheduled browser and protocol checks.
- **AI:** AI Assistant, SRE Agent for AI root cause analysis, an MCP server, LLM observability and evaluations, anomaly detection, log patterns, and insights.
- **Alerting and reliability:** scheduled, real-time, composite, and anomaly alerts, incident management, and SLOs with error budgets and burn rates.
- **Dashboards and reports:** real-time dashboards and scheduled PDF, PNG, or CSV reports.
- **Data processing:** pipelines, VRL functions, enrichment tables, and metrics downsampling.
- **Storage and cost:** Parquet on object storage, Bring Your Own Bucket on Cloud, extended retention, and ingest-based pricing with unlimited users.
- **Security and governance:** SSO, RBAC, multi-tenancy, sensitive data redaction, audit trail, cipher keys, and federated search.
- **Compliance:** SOC 2 Type II, ISO 27001, and GDPR via the EU-Central 1 (Frankfurt) region.
- **Open standards:** OpenTelemetry-native ingestion, PromQL and SQL querying, and open source under AGPL-3.0.

## Get started with OpenObserve

- Sign up for [OpenObserve Cloud](https://cloud.openobserve.ai) with a 14-day free trial.
- Or self-host against your own bucket with the [OpenObserve quickstart](https://openobserve.ai/docs/getting-started/).
- Related reading: [replacing Elasticsearch for log management](/blog/replace-elasticsearch-log-management/).

## Frequently Asked Questions

### What is the lowest-cost way to retain logs for one year?

Store them in object storage in a columnar, compressed format and query them in place. Amazon S3 Standard lists at $0.023 per GB-month and Standard-IA at $0.0125, far below block storage or indexed log platforms. OpenObserve writes logs as compressed Parquet to object storage and queries it directly, so a year of logs costs roughly what the bucket costs, with no rehydration step.

### Can I still query archived logs?

It depends on where they're archived. Logs in S3 Standard, Standard-IA, or Glacier Instant Retrieval can be read in milliseconds. Logs in Glacier Flexible Retrieval or Deep Archive take minutes to hours to restore before any tool can read them. With OpenObserve, a year of logs in object storage stays searchable with the same SQL query you run on today's data.

### Should I use hot and cold tiers for log retention?

Only if your platform makes cold data hard to query. Traditional stacks keep recent logs on fast disks and push older logs to an archive you have to rehydrate. OpenObserve stores all data on object storage and caches recent files on queriers, so there's no manual tiering: recent and year-old logs live in the same place and answer the same queries.

### Can I use my own S3 bucket for log retention?

Yes. Self-hosted OpenObserve writes to any S3-compatible bucket you configure. On OpenObserve Cloud, Bring Your Own Bucket (BYOB) writes your telemetry to your own Amazon S3, Azure Blob, or Google Cloud Storage bucket, so you pay your cloud provider for storage and keep data as long as you want.

### How much does a year of log retention cost on OpenObserve Cloud?

Logs include 30 days of retention, and each additional 30-day period costs $0.02 per GB. Keeping a full year adds 11 periods, or $0.22 per GB ingested over the year, on top of the ingestion price of $0.50 per GB on an annual contract or $0.70 per GB pay-as-you-go. With BYOB, retention has no OpenObserve limit and you pay your cloud provider for the bucket.
