Skip to content
Knowledge base

Log retention policy: how long to keep system and security logs under NIS2 in Poland, DORA and the GDPR

Laws rarely state how many days logs must be kept. The DORA RTS and Regulation 2024/2690 require you to set the retention period yourself, and the GDPR forbids keeping personal data longer than necessary. The period therefore has to be justified by its purpose.

Cybersecurity and data protection laws rarely state how many days a company must keep its logs. A sound log retention policy therefore starts from the purpose of each log: Poland’s Act on the National Cybersecurity System requires monitoring, EU regulations require you to set the retention period yourself, and the GDPR forbids keeping personal data longer than necessary. Log retention is a decision that has to be justified, not a value to copy from a statute.

This has practical consequences for cybersecurity. Retention that is too short means that once an intrusion is detected, nobody can establish when and how the attacker got in. Retention that is too long means keeping personal data without a basis and rising storage costs. A well-chosen period follows from the purpose of each type of log and is written into a policy that can be shown to an auditor.

What is log retention and why should its period be set deliberately?

Log retention is the set of rules that determines how long a company keeps records of events from systems, networks and applications, where it keeps them and when it deletes them. It covers logs from operating systems, domain controllers, firewalls, mail servers, applications and security tools. It also covers log backups, because deleting data from the platform does not delete it from the backups.

The retention period affects three things at once. Detection, because correlation rules in a SIEM need data from recent days and weeks. Investigation after an incident, because an attack detected late requires logs from the period when the attacker was already in the network. And legal compliance, because logs containing personal data are subject to the GDPR.

Legal position as of 22 November 2026. Poland’s Act on the National Cybersecurity System applies as amended on 23 January 2026, with later amendments that do not concern Article 8, and the GDPR, Delegated Regulation (EU) 2024/1774 and Implementing Regulation (EU) 2024/2690 have no amending acts.

What does Poland’s Act on the National Cybersecurity System say about logs?

The Polish Act on the National Cybersecurity System requires essential and important entities to monitor their information system continuously, but that provision does not state a log retention period. As amended by the act of 23 January 2026 (Journal of Laws 2026, item 252, in Polish), Article 8(1) requires an information security management system which ensures, among other things, technical and organisational measures proportionate to the risk.

Among those measures, point 2(g) lists covering the information system used to provide the service with continuous monitoring. Monitoring without event records is not possible, so in practice logs are the basis of this obligation, and their retention period follows from the risk assessment the same article requires. Article 8(1) also lists collecting information on cyber threats and vulnerabilities (point 3) and incident management (point 4), and both tasks rely on the same logs.

The 2026 amendment transposed into Polish law the requirements of the NIS2 Directive, which applies through national legislation rather than directly. For a Polish company the source of the obligation is therefore the national act, not the directive itself; organisations in other EU countries should check their own national transposition.

What does Implementing Regulation 2024/2690 say about logging?

Implementing Regulation (EU) 2024/2690 requires logs to be kept for a predefined period, but it does not state that period. It applies to selected digital entities: DNS service providers, TLD name registries, cloud computing service providers, data centre service providers, content delivery networks, managed service providers and managed security service providers, online marketplaces, search engines, social networking platforms and trust service providers.

The annex to Regulation 2024/2690, in point 3.2.3, lists what logs include where appropriate: inbound and outbound network traffic, creation and changes of accounts, access to systems and applications, authentication events, privileged access and activities on administrative accounts, access to configuration and backup files, logs from security tools, and physical access to facilities.

Point 3.2.5 says that entities maintain logs and back them up for a predefined period and protect them from unauthorised access or changes. Point 3.2.6 adds, to the extent feasible, synchronised time sources, so that logs can be correlated between systems. For companies outside the list in Article 1 the regulation is not mandatory, but its list of log sources makes a good checklist.

Key points:

  • Poland’s Act on the National Cybersecurity System requires continuous monitoring, and that provision does not state a log retention period.
  • The DORA RTS and Regulation 2024/2690 require the retention period to be set by the entity, taking the purpose into account.
  • The GDPR limits keeping logs with personal data to the period necessary for the purpose.
  • Set the retention period separately for each log source and record it in the policy.

What does DORA require from financial entities regarding logs?

DORA requires financial entities to have logging procedures that set the log retention period themselves. Delegated Regulation (EU) 2024/1774, which supplements DORA with the ICT risk management framework, in Article 12(1) requires financial entities to develop, document and implement logging procedures, protocols and tools.

Article 12(2) lists their mandatory elements. Point (a): identifying the events to be logged, the retention period of the logs and the measures to secure them, considering the purpose for which the logs are created. Point (c): logging events related to access control and identity management, capacity management, change management, ICT operations and network traffic. Point (d): protecting logging systems against tampering, deletion and unauthorised access. Point (f): aligning the clocks of ICT systems with a reliable time source.

DORA has applied since 17 January 2025, and RTS 2024/1774 entered into force in July 2024. For a bank, insurer or investment firm this means the log retention period must be written into a procedure and linked to the purpose of the log.

How does the GDPR limit the retention of logs?

The GDPR limits the retention of logs containing personal data to the period necessary for the purpose. Article 5(1)(e) of the GDPR requires data in a form that permits identification to be kept for no longer than is necessary for the purposes of processing. Point (c) adds data minimisation: data must be limited to what is necessary.

Logs can contain personal data. An employee’s IP address, an account identifier in a sign-in log, an email address in a mail server log or a name in an application log make it possible to link an event to a person. Such logs are therefore processing of personal data, and their retention period has to be justified by a purpose, for example detecting incidents and defending against claims.

At the same time the GDPR requires security of processing. Article 5(1)(f) and Article 32 require measures appropriate to the risk, and logs are one of them. In practice a policy that states the purpose, the period and the method of deletion for each type of log reconciles both requirements.

Why is there no single number of days for all logs?

There is no single number of days because different logs serve different purposes, and the law links the period to the purpose. The DORA RTS speaks of a retention period set “considering the purpose for which the logs are created”, Regulation 2024/2690 of a “predefined period”, and the GDPR of a period “necessary for the purposes”.

In practice logs from domain controllers and authentication systems are needed for longer than performance logs, because they allow you to reconstruct how an account was taken over. Firewall logs with outbound traffic help establish whether data left the network. Application logs with customer data need a shorter period or pseudonymisation, because they contain more personal data.

Sources outside general legislation also affect the period. Customer contracts, industry standards or card scheme rules may require a specific retention period.

The period also has another side: cost and risk. Every additional month of storage means more data to protect, and logs containing a password typed by mistake into the username field or a token in a URL become a target in their own right. That is why the period should not be longer than the purpose it serves.

How do you set the retention period for each type of log?

You set the retention period in four steps: list the sources, define the purpose of each source, derive the period from the longest justified purpose and record it in the policy. This line of reasoning matches the DORA RTS requirement that the retention period take the purpose of the log into account, and the storage limitation principle of the GDPR.

The first step is an inventory of sources. The list in point 3.2.3 of Regulation 2024/2690 works well as a checklist even in companies the regulation does not cover. For each source, note whether the log contains personal data and who owns it.

The second step is purpose. Detection needs logs immediately available in the SIEM. Investigation after an incident needs logs reaching back to the period in which an attacker could have stayed undetected in the network. Evidence for an auditor and contractual obligations may require yet another period. The period for a source follows from the longest of these purposes that can be justified.

The third step is splitting storage into tiers. Logs needed for day-to-day detection are kept in the fast tier of the platform, and older ones in a cheaper archive tier, from which they can be restored for an investigation.

The fourth step is recording and review. The policy states the period for each source, the justification by purpose and the person responsible for deleting the data once it expires. Regulation 2024/2690, in point 3.2.7, requires the procedures and the list of logged assets to be reviewed at planned intervals and after significant incidents. The same rule works in companies the regulation does not cover.

How do you protect logs so that they can serve as evidence?

Logs can serve as evidence only if nobody could have altered them and if they can be placed in time. Both EU acts say so directly: Regulation 2024/2690 requires logs to be protected against unauthorised access or changes, and the DORA RTS requires logging systems to be protected against tampering, deletion and unauthorised access.

In practice this means forwarding logs continuously to a central system in which administrators of the monitored servers have no rights to delete data. An attacker who takes over an administrator account may try to wipe the logs on the compromised server. The copy in the central system remains. That is why the accounts that manage the log platform should be different from the administrator accounts of the monitored servers.

The second condition is time. The DORA RTS requires clock synchronisation, and Regulation 2024/2690 requires it to the extent feasible, because without it events from different systems cannot be put on one timeline. The third is monitoring the logging itself: the DORA RTS requires measures to detect failures of logging systems, because a gap in the logs during an attack can itself be a signal.

How do you write log retention rules into a policy?

A log retention policy should state, for each source, the purpose, the period, the storage location, the protection and the method of deletion. The legal basis in each row shows where the duty to log that source comes from.

Type of logPurposeBasisWhat to watch
Authentication and domain controllerDetection and investigation after an account takeoverPolish KSC Act Art. 8(1)(2)(g); DORA RTS Art. 12(2)(c)Personal data (accounts, IP addresses) — GDPR Art. 5(1)(e)
Firewall and outbound trafficEstablishing whether data left the networkRegulation 2024/2690 point 3.2.3(a)Large volume — archive tier
Administrative accounts and permissionsReconstructing activity on privileged accountsRegulation 2024/2690 point 3.2.3(b) and (e)Protection against deletion by administrators
Security tools (EDR, IDS)Correlation and incident analysisRegulation 2024/2690 point 3.2.3(g)Time synchronisation (point 3.2.6)
Applications with customer dataDiagnostics and application securityGDPR Art. 5(1)(c) and (e)Minimisation, pseudonymisation

None of these acts states a number of days, so the company sets the period for each source in its policy, based on the risk assessment, and for logs with customer data together with the data protection officer.

How can nFlo help you manage logs and their retention?

nFlo’s Security Operations Center (SOC) service covers, among other things, integrating log sources and configuring the SIEM, and correlating events from the IT infrastructure. nFlo’s portfolio also includes IBM Security QRadar Log Insights, cloud log management with storage tiers, and OpenText ArcSight with its Logger component for log storage.

Setting retention periods is part of risk management, covered in the article on risk management in cybersecurity, and deleting data once the period expires in the article on data lifecycle management. The concept is explained in the SIEM glossary entry. If you want to put your log sources and retention rules in order, contact us.

What else should you know about log retention?

Does Poland’s Act on the National Cybersecurity System say how long to keep logs?

The Polish Act on the National Cybersecurity System, as amended in 2026, requires the information system to be covered by continuous monitoring (Article 8(1)(2)(g)), but that provision does not state a log retention period.

Does DORA set a log retention period?

Delegated Regulation (EU) 2024/1774 requires a financial entity’s logging procedures to set the retention period for logs, taking their purpose into account, but it does not state the period itself. The entity decides.

Do logs contain personal data?

They can: IP addresses, account identifiers or names in sign-in logs may be personal data. The GDPR then applies, including storage limitation under Article 5(1)(e).

Do logs have to be protected against modification?

Yes. Implementing Regulation 2024/2690 requires logs to be protected against unauthorised access or changes, and the DORA RTS requires logging systems to be protected against tampering, deletion and unauthorised access.

Where should you start when setting retention periods?

With a list of log sources and the purpose of each: detection, investigation after an incident, evidence for an auditor, or an obligation from a contract or law. The period follows from the longest justified purpose and is written into the policy.

Share:

Talk to an expert

Have questions about this topic? Get in touch with our specialist.

Sales Representative
Grzegorz Gnych

Grzegorz Gnych

Sales Representative

Response within 24 hours
Expert consultation
Individual approach

Providing your phone number will speed up contact.

Want to Reduce IT Risk and Costs?

Book a consultation - we respond within 24h

Response in 24h Custom quote No obligations