PostgreSQL backup and restore testing for DORA

How self-hosted PostgreSQL supports DORA backup and recovery expectations, which parts remain your responsibility, and what evidence to keep for supervisors and management.

On this page

Which DORA backup and recovery expectations PostgreSQL helps you evidence

If your organization is a financial entity in scope of DORA, which has applied since 17 January 2025 under Article 64, and it runs PostgreSQL behind an ICT service, PostgreSQL gives you the backup, archive, standby and restore mechanisms, but DORA compliance is an organizational obligation that the database alone does not satisfy. The regulation makes your management body and your ICT risk management framework accountable for how recovery is designed, tested, governed and reported. PostgreSQL can produce the technical artifacts that support that work, such as base backups, archived WAL files and restore test results, but it cannot decide your recovery objectives, approve your policies or accept residual risk for you.

The backup and recovery requirements sit mainly in the ICT risk management chapter, Articles 5 to 16 of Regulation (EU) 2022/2554, and in the technical standards the European Supervisory Authorities produced under the regulation's mandates. DORA sets no certification scheme, so no body will issue a DORA certificate for your PostgreSQL estate. Competent authorities supervise compliance using their own powers, and DeployOpen prepares systems, controls and evidence for that review without issuing attestations, which only independent parties can give. Before you rely on any article number or sub-requirement in this section, confirm the exact wording against the DORA text on EUR-Lex and against your national competent authority's guidance.

The practical starting point is to map each PostgreSQL service that supports a critical or important function to the recovery expectations your policy sets, then decide what evidence each expectation requires. Ask your compliance lead which regulatory technical standards apply to your entity type, and ask your legal team how your ICT service contracts and register of information describe where data is stored and who can restore it. Those answers determine which of the sections that follow matter most for your estate.

How PostgreSQL capabilities map to DORA recovery expectations

This table pairs each recovery expectation that DORA raises for ICT systems with the PostgreSQL feature that addresses it, the settings to configure, and the parts that need a system outside PostgreSQL. Read each row as a question to answer for your own estate: the database provides the mechanism, but the policy, retention, separation and evidence come from your team and your providers.

Recovery expectationPostgreSQL capability and configurationWhere an external system is needed
Point-in-time recovery to a chosen momentBase backups plus archived WAL. Set archive_mode to on and archive_command to copy each completed WAL segment to a separate location, then schedule regular base backups.Archive target with retention and access separate from the database hosts. Confirm how archive gaps are alerted on.
Reduced backup size and windowIncremental backups with pg_basebackup, reconstructed at restore time with pg_combinebackup. Test a restore that uses a full backup and its incremental chain.Backup catalog or orchestrator to track which full and incremental sets belong together and when each expires.
Copies held apart from the primaryBackups written by tooling run from a host with separate credentials. The database itself does not decide where copies go.Off-site or separate-account object storage. Ask whether the provider supports object lock or immutability for stored copies.
Service continuity when a server failsHot standby servers with streaming replication. Synchronous replication makes commits wait for standbys, trading write latency for lower data loss. Asynchronous replication does not wait.Placement of standbys in a separate failure domain must be designed in your infrastructure. Record the replication mode chosen for each critical service.
Automatic switchover to a standbyPostgreSQL does not detect primary failure or promote a standby on its own.External failover tooling and a consensus or witness design, plus monitoring that alerts on failover events and replication lag.
Restore evidenceRestores can be rehearsed on a separate instance using the same base backup and WAL, then checked with row counts, checksums and application tests.Monitoring and ticketing to store run logs, measured elapsed time and sign-off. Confirm which evidence your competent authority or auditor expects.
Exit and data return from an ICT providerNot a database function. Keep logical or physical copies in a format you can restore on another platform.Register entries under Article 28(3). Exit strategy and tested transition plans under Article 28(8). Data location and data return terms in each contract under Article 30(2).

How point-in-time recovery, standbys and separated copies fit one backup policy

A DORA backup policy for PostgreSQL works best when it names three recovery layers and assigns each one a job. The first is a standby, a hot standby that serves read-only queries and can be promoted if the primary fails. The second is a base backup combined with archived WAL files, which lets you restore the database to a chosen point in time. The third is a separated copy stored outside the primary failure domain, meaning a different account, site, or credential boundary. Each layer answers a different failure, and none of them answers all of them. Replication alone is not a backup. A standby copies whatever the primary commits, so a dropped table, a bad batch update, or a deleted customer record reaches every standby within moments. Only the archived WAL and base backup let you go back to a moment before the error.

The replication mode is a trade-off, not a default. With synchronous replication, a commit waits until the configured standbys confirm it, which narrows the data loss window on a primary failure but adds latency to every write and can stall commits when standbys are unavailable. Asynchronous replication keeps write latency low but leaves a gap between the last acknowledged commit and what the standby holds. Choose the setting against your recovery point objective, then test how the database behaves when a standby is slow or down. Confirm the exact behavior for your PostgreSQL version against the PostgreSQL high availability documentation before you write it into the policy.

PostgreSQL does not include software that detects a primary failure and tells a standby to take over, so automatic failover depends on external tools. Your team must select that tooling, decide who may trigger a promotion, and document the fencing steps that stop the old primary from accepting writes after promotion. The PostgreSQL failover documentation describes the mechanics. Test the chosen tool against planned and unplanned failures, record the observed timings, and keep the runbook current. An untested failover tool can make recovery slower than a manual procedure, so the policy should state which failures are handled automatically and which require a human decision.

How the primary, standbys, WAL archive and separated copies connect

The diagram starts at the primary server, which streams WAL to one or more standbys in the production network and ships WAL segments and base backups to an archive in the backup network. A separate off-site copy, held under separate credentials in another failure domain or account, receives the archive contents. Restores run from a base backup plus archived WAL, while standby promotion is a different path that needs external failover tooling. Confirm with your storage vendor whether immutability and object lock actually apply to this store.

Replication, archive and off-site copy paths, with trust boundaries and restore and promotion paths separated.

Sequence for a DORA-ready PostgreSQL backup and restore program

This sequence takes a PostgreSQL estate from an unmapped set of databases to a documented backup and restore program with tested recovery and evidence that management and supervisors can review. Each step produces an artifact that the next step depends on.

  1. Inventory ICT services and their criticality

    Start by listing every PostgreSQL instance and the ICT services it supports, then mark which services support critical or important functions. Ask the business owner of each function to confirm the mapping, because the classification drives every later target. The step is done when each database has a named service owner, a criticality rating and a link to the contractual arrangement for any hosting or support provider. These entries feed the register of information required by Article 28(3) of DORA, so the inventory should use the same identifiers that the register uses.

  2. Set recovery point and recovery time targets

    For each service marked critical or important, record a recovery point objective and a recovery time objective, agreed by the business owner and approved by the ICT risk function. Write the targets in the backup policy with the reasoning behind them, since a supervisor will ask how each number was chosen. The step is complete when every in-scope database has both targets on file and the targets are traceable to the service inventory. Confirm with your risk team whether any regulatory or contractual minimums apply to a given service.

  3. Choose backup tools and schedules

    Select the backup method for each database, such as base backups with continuous WAL archiving for point-in-time recovery, and set the full and incremental schedule that meets the recovery point target. PostgreSQL supports point-in-time recovery from a base backup plus archived WAL files, and pg_basebackup can take incremental backups that pg_combinebackup reconstructs at restore time, so confirm that the chosen tooling supports the restore sequence you intend to test. Document the tool versions, retention periods and the owner of each schedule. The step closes when the policy names one method per service and a reviewer has signed off the schedule.

  4. Configure WAL archiving and base backups

    Enable WAL archiving and take the first base backup on each in-scope cluster, then verify that archived segments reach the backup repository without gaps. Keep the configuration in version control so that changes are reviewed and dated. The step is done when a test write produces a WAL segment in the archive and a base backup is listed with its start time, size and checksum status. Record these outputs as the baseline for the monitoring work that follows.

  5. Separate credentials and storage for copies

    Store backup copies outside the production database host and the production administrative account. Give the backup process its own database role with only the privileges needed for backup, and place the repository in a separate storage account or location with restricted deletion rights. Where your architecture allows, add immutable or write-once retention for the most recent copies so that an attacker or an administrator error cannot erase them. The step is complete when access reviews show that no single production administrator can alter both the database and its backup set, and a documented test confirms that a deletion attempt is refused or logged.

  6. Monitor archive gaps and backup failures

    Add alerts for failed base backups, missing or delayed WAL segments, repository capacity and the age of the last successful copy, and route them to a team that can act outside office hours. Compare the observed age of the latest copy with the recovery point objective so that a breach is visible before it becomes an incident. The step closes when a deliberately failed backup job triggers the alert in the on-call tool and the event is recorded in the operations log.

  7. Run and record restore tests

    Restore each critical database into an isolated environment, including a point-in-time restore to a chosen timestamp, and measure how long each stage takes against the recovery time objective. Check restored data with agreed row counts or application validation queries, and record who ran the test, the backup used, the timings, any deviations and the follow-up actions. Keep the results with the policy so that the test history can be shown as evidence. The step is done when each critical service has a dated restore record that compares measured time with the target.

  8. Feed results into ICT risk and incident reporting

    Send restore test results, missed targets and monitoring alerts into the ICT risk register and the ICT-related incident process, so that gaps are assessed, owned and tracked to closure. Update the exit strategy and transition plan required by Article 28(8) where a restore test shows that a provider-hosted service would be hard to recover elsewhere. Report a summary to management with the recovery measurements, open findings and decisions needed. The step closes when management has reviewed the summary and each open finding has an owner and a recorded decision.

How restore tests differ for point-in-time recovery, standby promotion and full rebuild

Point-in-time recovery (PITR) applies when data is damaged logically, for example by an accidental deletion, a faulty migration or a bad update. The test restores a base backup, replays archived WAL files up to a chosen timestamp before the error, and checks that the data is correct at that moment. PostgreSQL's continuous archiving documentation describes this combination of a base backup and archived WAL. Because the test is about a point in time, the proof is the data state at the target, not only that the restore completed.

  • Target timestamp: Pick a timestamp, record it, and confirm the restored database contains the rows expected at that moment and none of the rows written after it.
  • Timing: Record when the damaging event happened, when recovery started, when replay reached the target and when the database accepted connections. Those four times give the recovery time measurement.
  • Archive continuity: Confirm every WAL segment between the base backup and the target is present and readable. A gap should fail the test and appear in the findings.
  • Roles: The database owner selects the target and checks data, the platform team runs the restore, and an application owner signs off on business data.
  • Failed test output: A missing segment, wrong data at the target or an unexplained delay should produce a finding with the root cause, the affected backup set and a retest date.

If the backup set uses incremental backups from pg_basebackup, confirm that pg_combinebackup reconstructs the full backup in this test rather than assuming it works.

Evidence to keep for restore tests and recovery time reporting

The records below show how a PostgreSQL backup and restore program runs over time, from configuration to the report that reaches management. Each one is kept current by a named owner and tied to the others, so a reviewer can trace a stated recovery target back to a tested restore. None of these artifacts is sufficient on its own, and whether the set meets DORA expectations is for the financial entity's competent authority and its auditors to decide.

Backup schedule and configuration records

Keep the exported configuration of every backup job: base backup schedule, incremental backup cadence, retention periods, archive_mode and archive_command settings, and the backup tool version. Store these in version control so every change has an author, a reason and a review. Check at each review that the recorded schedule matches what the scheduler actually runs, since drift between documentation and production is a common finding. Sign-off belongs to the database owner, with the risk function reviewing changes to retention.

WAL archive continuity records

Point-in-time recovery depends on an unbroken chain of archived WAL files after each base backup. Keep periodic reports that show the archive has no gaps, the newest archived segment and its timestamp, and any failed archive_command attempts with their resolution. Alert when archiving stalls, because a stalled archive can go unnoticed until a restore needs the missing segments. Operations staff review these reports, and the database owner signs off on any gap and its impact on the recovery point.

Continuous archiving docs

Restore test run records

For each test, record the start and end time, the backup set and target used, the restored point in time, the environment, the person who ran the test and the checks performed after restore, such as row counts on key tables and application smoke tests. Keep the output of the restore commands and any errors. A test that did not reach the intended point in time should be recorded as a failed test, with its cause and the retest date. Testers sign each run, and the service owner approves the results.

Measured recovery time against target

Compare the elapsed time of each restore test with the recovery time objective stated for the service, and record the gap. Include the steps that consumed the time, such as copying the base backup, replaying WAL or verifying data, so the figure can be improved. Report measured times separately from estimates. A target that no test has met should be flagged as unverified, not presented as achieved. The service owner and the business continuity lead sign off on each comparison.

Separation and access records for copies

Document where each copy lives, including the account, network segment and region, whether it is immutable or protected by object lock, and who can read, write or delete it. Keep access reviews for the backup platform and its keys, and record any administrator who can alter retention settings. Confirm that a compromised production credential cannot remove the copies. The security team reviews these records each quarter, and the infrastructure owner signs off on any exception.

Management report with decisions and remediation

Summarize for management the backup coverage, the latest restore test results, measured recovery times, open findings and the decisions taken, with owners and due dates. Include the risk accepted for any target not yet met, and the date it will be retested. Management should approve the report and the accepted risks in writing. This record links the technical evidence above to governance, and it is the item most often requested by reviewers as proof that leadership saw the results.

Questions to answer before hiring help for DORA restore testing

What does outside help for DORA restore testing cost, and what drives the price?

The price follows from the written scope, and no figure is published here. Cost is driven by the number of ICT services in scope, how many PostgreSQL clusters and environments each service uses, the size of the datasets that must be restored, how many restore tests run and how often, and whether new tooling such as a backup product, an isolated restore environment or monitoring must be built. Ask the partner to separate one-time work (inventory, backup design, first restore tests, test scripts) from recurring work (scheduled restore tests, retesting after changes, reporting to management). Ask for the quote to list each ICT service and environment as a line item so you can see what changes if scope moves.

How long does a scoped DORA restore testing engagement take?

Duration depends on how many services and databases are in scope, how complete your current backup records are, and how quickly your business owners can review results. Work that usually sets the timeline is the inventory of PostgreSQL estates and their recovery targets, access to non-production environments that can hold a restored copy, and agreeing what counts as a successful restore. Ask for a timeline in the written scope with named milestones and the dependencies you must clear, such as access approvals and change windows. Because most engagements are fixed-scope, agree on the timeline before work starts rather than after the first test fails.

What must our bank provide before a partner starts restore testing?

The partner needs four things from you. First, architecture records for each PostgreSQL cluster, including replication setup, base backup and WAL archive locations, and the systems that depend on each database. Second, recovery targets for each ICT service, expressed as the maximum data loss and downtime the business accepts. Third, access to environments where restores can run, with credentials that follow your privilege model. Fourth, named business owners who will review and sign off test results. Ask the partner to produce a short list of these inputs at the start so gaps appear in week one, not at the first test window.

Can our internal team run DORA restore tests without an outside partner?

Yes, many teams with PostgreSQL experience can run restore tests internally, provided they have the skills, time and independence to do it properly. The work is mostly procedural: restore a backup into an isolated environment, replay archived WAL to a chosen point in time, check database integrity and application behavior, and measure elapsed time against the recovery target. The harder parts are keeping the test independent of the team that operates the backups, documenting results consistently, and keeping the schedule when production work competes for the same people. Ask yourself whether the same engineers who configure backups can also sign off that the restore worked. If not, a partner or a separate internal function may be needed for that check.

Can DeployOpen certify that our organization is DORA compliant?

No. DeployOpen does not issue audit reports, attestations or certifications. DORA sets no certification scheme, and supervision is carried out by the competent authority for each type of financial entity under Article 46, using the powers in Article 50. What DeployOpen can do is plan and run restore tests, prepare the records, measurements and reports that support your own ICT risk management and backup evidence, and hand them to your management and your independent auditors. Be cautious of any provider that offers a DORA compliance certificate for backup work, and ask how the evidence will be used by your own compliance function.

How is restore test evidence handed over to us?

Evidence should be handed over as a set of records you can keep, review and reproduce. Ask for a test plan per ICT service, the restore procedure used, the backup and WAL identifiers restored, the target point in time, the measured recovery time, integrity and application checks performed, any deviations, and the sign-off by the named business owner. Also ask how raw logs and command output are stored, who retains them, and how long they stay available. Agree the format in the written scope, so that the records feed your register of ICT risks and your management reporting without manual rework.

What should an engineer check in a partner's restore test plan?

Engineers should check that each test restores from the real backup chain rather than a fresh snapshot, that the restore includes WAL replay to a defined recovery target, and that the test runs in an environment isolated from production. Look for a clear definition of success, including row counts or checksums, application-level queries, and extension and role checks. Confirm that the recovery time is measured from the decision to restore to the point the application accepts traffic, and that results are compared against the targets your business set. Ask how the test handles failures, whether it reruns after a change to backup tooling, and whether credentials used during testing are removed afterward.

How DeployOpen scopes and delivers DORA-oriented PostgreSQL recovery work

DeployOpen plans, builds and documents PostgreSQL backup and restore controls inside your own infrastructure, then helps you test restores and record the results. The work is agreed in a written, fixed scope, so your compliance, risk and operations teams can review what will be delivered before it starts.

How we scope

  • Review your ICT risk framework, critical functions and the PostgreSQL clusters that support them before defining backup targets.
  • Agree recovery point and recovery time objectives per database with the business owners who must accept them in writing.
  • Define the written scope, deliverables and timeline for your estate, with named responsibilities for your team and ours.

How we build

  • Configure base backups and WAL archiving for point-in-time recovery, with separated storage locations and immutability settings you verify.
  • Set up incremental backups with pg_basebackup and pg_combinebackup where your restore design calls for them, and test each reconstruction path.
  • Run scripted restore drills into an isolated environment, timing each step and recording failures, gaps and manual actions for remediation.

How we hand over

  • Deliver backup policies, restore runbooks and a register of tested recovery scenarios written for your operations and audit teams.
  • Provide restore test records with timestamps, measured recovery times, versions tested and the people who signed off each result.
  • Prepare a management report template that summarizes recovery performance against agreed targets and lists open findings with owners.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, including scheduled restore tests and report refreshes.
  • Plan PostgreSQL minor and major upgrades so that backup and restore procedures are retested against each new version.
  • Confirm with your legal and compliance advisers which DORA obligations apply to your entity, since DeployOpen prepares evidence but does not issue attestations.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.