Log retention requirements by regulation

8 min readUpdated June 29, 2026

"How long should we keep our logs?" has no single answer — it depends on which regulations apply to you and the risks you are managing. Some regimes give you a hard number (PCI DSS, HIPAA, SOX); others (the GDPR, ISO 27001, NIS2, DORA) make it risk-based and leave the figure to you. This guide lays out the requirements side by side and shows how to set a defensible retention policy.

Not legal advice

The figures below are widely-used baselines, not a substitute for legal review. Retention can be affected by your sector, jurisdiction, national law, and contractual obligations — confirm the specifics for your organisation.

The short answer

There is no universal log-retention period. The practical rule is to take the strictest requirement that applies to you and keep logs at least that long — while not keeping personal data longer than you can justify under the GDPR. Most organisations end up with a tiered policy: a hot tier (fast to search, for active investigation and monitoring) and a cheaper archive tier (for long-term forensic and compliance needs).

Log retention by regulation

How the major regimes treat log and audit-record retention:

RegulationRetentionNotes
PCI DSS v4.0≥ 12 months, with ≥ 3 months immediately availableRequirement 10. A hard minimum for cardholder-data environments.
HIPAA6 yearsDocumentation/record retention for covered entities and business associates.
SOX7 yearsRecords relevant to financial reporting (SEC 17 CFR 210.2-06).
GDPRNo fixed figure — storage-limitation principleJustify retention by purpose; commonly 1–3 years for security logs. Don’t keep personal data longer than needed.
ISO 27001:2022 (A.8.15)No fixed figure — risk-basedThe Logging control; set retention in your ISMS. 12 months is a common baseline.
NIS2No fixed figure — risk-basedSet by national transposition; commonly 6–18 months. Keep long enough to detect and investigate.
DORANo fixed figure — policy-definedThe ICT risk-management RTS requires you to define the retention period in a logging policy.

When several regimes apply

Take the longest binding requirement. For example, an entity under both HIPAA (6 years) and SOX (7 years) should retain for 7 years, which also covers PCI DSS and most GDPR security-log use cases — provided you can still justify holding any personal data for that long.

Hot vs. archive: retention is a cost decision

Retention length and search speed pull in opposite directions on cost. Keeping everything instantly searchable for years is expensive; keeping nothing fails compliance and forensics. The usual answer is two tiers:

  • Hot tier — recent logs (often 30–90 days, sometimes longer) kept fast to query for live monitoring, alerting and active investigation.
  • Archive / cold tier — older logs kept in cheaper storage to satisfy the long-tail compliance window and reconstruct incidents that surface months later.

The economics of the hot tier are driven by your storage engine. A columnar store with strong compression keeps long retention affordable — see log management built on ClickHouse for why this matters.

How to set a defensible retention policy

  1. List every regulation, contract and sector rule that applies to you.
  2. Identify the strictest binding retention requirement among them.
  3. Add a risk-based buffer for incident detection and forensics (attacker dwell time is often months).
  4. Decide your hot vs. archive split based on search and cost needs.
  5. Apply GDPR storage-limitation: don’t keep personal data longer than the justified purpose; redact where possible.
  6. Write it down — document the period chosen and the risk/legal basis for it.
  7. Protect the logs: tamper-evident storage, access control, and audited access.
  8. Review the policy periodically and when regulations or your estate change.

How LogPulse supports log retention

LogPulse retains your logs for the window your plan provides on a cost-efficient ClickHouse engine, with search fast enough to investigate recent data and the depth to reconstruct older incidents. Pipelines can redact PII before storage to support GDPR storage-limitation, and data stays in the EU. For the specifics of plan retention windows, see ClickHouse log management, and the NIS2 and DORA guides for the EU regimes that drive retention. LogPulse supports your compliance programme and produces evidence; it is not itself a certification.

Frequently asked questions

How long should you keep logs?
There is no universal answer. Take the strictest retention requirement that applies to you and keep logs at least that long, while not holding personal data longer than the GDPR allows. Most organisations use a tiered policy: a hot tier (recent logs, fast to search) and a cheaper archive tier for the long-tail compliance and forensic window.
What is the minimum log retention for PCI DSS?
PCI DSS v4.0 (Requirement 10) requires retaining audit logs for at least 12 months, with at least the most recent 3 months immediately available for analysis.
Does the GDPR set a log retention period?
No. The GDPR applies the storage-limitation principle: keep personal data only as long as needed for the stated purpose, and justify the period. For security logs containing personal data, organisations commonly retain 1–3 years and redact where possible.
What is the difference between hot and cold (archive) log retention?
The hot tier holds recent logs kept fast to query for live monitoring, alerting and active investigation. The archive (cold) tier holds older logs in cheaper storage to satisfy long compliance windows and reconstruct incidents that surface months later. Splitting the two controls cost while meeting retention.
How do you choose a log retention period?
List every regulation, contract and sector rule that applies, take the strictest binding requirement, add a risk-based buffer for incident detection and forensics, decide your hot/archive split, apply GDPR storage-limitation to personal data, and document the period and its legal/risk basis.

Logging and monitoring, on one EU-hosted engine

Centralise, retain and monitor your logs with AI-assisted search and a risk-based SIEM — GDPR-compliant and hosted in the EU. Start free.

Start free

We use cookies to analyze site traffic and improve your experience. No cookies are placed without your consent. Privacy Policy