Incremental backups with pg_basebackup and pg_combinebackup

PostgreSQL's built-in incremental backup from version 17 reduces what each backup copies, but the chain must be planned, verified and restored as a unit. This page explains how it works and where a dedicated tool still wins.

On this page

How PostgreSQL incremental backups with pg_basebackup fit a recovery plan

PostgreSQL 17 added incremental backups through pg_basebackup and pg_combinebackup. They reduce how much data each backup copies, but they do not replace WAL archiving. A team with a recovery point objective still needs continuous archiving of write-ahead log files, because a restore can only reach as far as the last archived WAL. The continuous archiving documentation describes point-in-time recovery as a base backup combined with archived WAL, and the incremental feature changes only how the base copy is taken and stored. Teams usually look at it when full base backups are large enough that taking them often strains storage, network capacity or the backup window.

The feature works in a chain. The server must have WAL summarization enabled, controlled by the summarize_wal setting, so it can track which blocks changed since the previous backup. pg_basebackup then uses the backup manifest of that earlier backup to copy only the changed data. At restore time, pg_combinebackup rebuilds a complete data directory from the full backup and every incremental after it, and that rebuilt directory is what the server starts from before WAL replay. Confirm the exact options and their behavior for your PostgreSQL minor release in the continuous archiving documentation before you write a runbook around them.

The decisions that matter are about the chain, not the individual copy. Every incremental depends on the backups before it, so retention must keep whole chains, and deleting one link can make later incrementals unusable. Restore time includes the combine step, and it grows as the chain gets longer, so a recovery time objective needs to be tested against the longest chain you intend to keep. Ask whether your team has a tested procedure for checking each chain with its manifests, and whether the combine step runs on hardware with enough space for a full data directory. Your recovery point still comes from WAL archive frequency, so set that target separately.

Which incremental backup options fit which environment

This table compares a full base backup, PostgreSQL 17 incremental backups with pg_basebackup and pg_combinebackup, and a dedicated tool such as pgBackRest or Barman. Read each row against your recovery point target, your cluster size and who will run restores. The main takeaway: native incremental mode removes an extra tool, but it makes you responsible for keeping the backup chain intact.

FactorFull base backupNative incremental (PostgreSQL 17+)Dedicated tool
Copy size per runCopies the whole cluster every timeCopies only blocks changed since the referenced backupDepends on the tool's incremental method and settings, so confirm them
Chain complexityOne backup, no dependenciesEach incremental depends on earlier backups, so the chain must stay completeTool tracks dependencies and retention in its own repository
Restore stepsRestore one copy, then replay archived WAL to a target timeCombine the chain into one data directory, then replay WALOne restore command reads the repository, then WAL replay
Tool dependenciesCore PostgreSQL utilities and WAL archivingCore utilities shipped with the server, plus WAL summarizationExtra software, its configuration, repository and credentials to protect
Version applicabilityAny major version you run within supportPostgreSQL 17 and later, so check the docs for your minor versionConfirm the tool's supported PostgreSQL versions before you plan
Settings to confirmarchive_mode and archive_command for point-in-time recoverysummarize_wal, wal_summarize_keep_time and the backup manifest your backup writesTool configuration file, repository path, retention and encryption settings
VerificationCheck the manifest and restore a copy in a test environmentRun pg_verifybackup on the manifest, then test a combined restoreUse the tool's verify command, then run a scheduled restore drill

Setting up incremental backups in sequence with checks

This sequence builds a chain of one full backup and later incremental backups that pg_combinebackup can rebuild into a restorable data directory. Each step ends with a check, so a broken link in the chain is found when it is made, not during a restore.

  1. Confirm the server runs PostgreSQL 17 or later

    The DBA or platform engineer runs SHOW server_version; on every server whose backups will use incremental mode, and on the host where pg_combinebackup will run. Incremental backups and pg_combinebackup are built into PostgreSQL 17 and later, so older binaries cannot take part in the chain. Record the exact minor version on each host. Done means every host reports 17 or later and the same major version is used for backup and restore tools.

  2. Enable WAL summarization on the server

    Set the summarize_wal parameter to on in the server configuration, then reload or restart as the parameter requires. WAL summarization records which blocks changed since earlier points, and pg_basebackup depends on those summaries to build an incremental backup. Confirm the setting with SHOW summarize_wal;, then check that summary files start to appear in the summaries directory under pg_wal after some write activity. Done means the setting reads on and the summaries are being written.

  3. Confirm the backup manifest is produced

    Each backup taken with pg_basebackup includes a backup manifest, a file named backup_manifest that lists every file in the backup with its size and checksum. The next incremental backup reads this manifest to decide what has changed, so it is part of the chain, not an extra file. Check the manifest settings your version documents, and decide where manifests and backups will be stored and protected. Done means you know which manifest belongs to which backup and that the checksum option you chose is the one the docs describe.

  4. Take the initial full backup

    The DBA runs pg_basebackup in its plain format into a new, empty target directory, with the WAL and checkpoint options your backup standard requires. This full backup is the root of the chain, and every incremental backup depends on it. Keep it in a directory that is never reused. Check that the target contains backup_manifest, backup_label, PG_VERSION and the data files the PostgreSQL backup documentation describes for your version. Done means the directory is complete and the manifest is in place.

  5. Take incremental backups against the chain

    Run pg_basebackup again into a new empty directory, pointing its incremental option at the backup_manifest from the previous backup in the chain. Each incremental backup holds only changed blocks, stored in files prefixed with INCREMENTAL., plus its own manifest. Repeat this for each scheduled run, always pointing at the manifest of the most recent backup. Check that each new directory has its own backup_manifest and the INCREMENTAL. files. Done means every run created a directory and linked to the expected parent.

  6. Record each backup's place in the chain

    Keep a chain register, such as a version-controlled file or a table in your backup system, with one row per backup. Record the backup name, type (full or incremental), parent manifest, start and finish times, the server name and the storage location. Compare each new entry with the parent's manifest before the backup is marked complete. A missing parent or a gap in the register means the chain is broken, and the next incremental backup should be a full backup. Done means every backup in storage has one row and an unbroken parent path back to a full backup.

  7. Test combining the chain in a scratch directory

    Run pg_combinebackup on a copy of the full backup and every incremental backup in order, writing the output to a new empty scratch directory on a separate host or path. The tool reconstructs a complete data directory from the chain. Start the reconstructed server only in an isolated environment, then check that it starts, reports the expected data, and that the log shows no errors. The PostgreSQL continuous archiving documentation describes how combined backups fit into point-in-time recovery with archived WAL. Done means the scratch restore starts and the result is logged as evidence.

Combining a chain with pg_combinebackup at restore time

pg_combinebackup needs every link in the chain, from the full backup forward, before it can produce a usable data directory. Each incremental backup records only the blocks changed since its parent, so the restore reads the full backup first and then applies each incremental in the order it was taken. If one link is missing, has been moved, or fails its checksum, the combine stops and there is no partial restore to fall back on. Keep the chain together in one location, and treat the backup manifests as part of the chain, because they are what lets you confirm each link is the one you expect before a restore begins. Verification of individual backups is covered in the verification section of this page.

The combined output is an ordinary base backup, so point-in-time recovery works the same way it does for any base backup. You still need the archived WAL that covers the period from the end of the last incremental backup through the target time, and the restored server replays that WAL using the usual recovery settings. Confirm that your WAL archive retains every segment from the start of the chain forward, because a gap in the archive will stop recovery even when every backup link is intact. Check the exact recovery configuration against the continuous archiving documentation for your PostgreSQL version rather than relying on memory.

Rehearse the restore before you rely on it. Write the order down as a runbook: locate the full backup, list each incremental in sequence, run pg_combinebackup into a new empty directory, start the server with recovery configured to your target, and confirm the data is what you expect. Time each step in a non-production environment so the runbook reflects your own storage speed and archive access, not an estimate. Ask your team to confirm which person can run the procedure at night, and test what happens when one link is deliberately removed, so the response to a broken chain is known in advance.

How to verify incremental backups before you rely on them

An incremental backup is only useful if the full chain of manifests, deltas and WAL can be rebuilt into a working instance. The checks below run in order, from the individual backup up to a point-in-time recovery, and each one produces evidence you can keep for auditors and runbooks.

Validate each backup manifest

Every backup directory contains a backup manifest that lists its files and checksums. Run pg_verifybackup against each full and incremental backup in the chain before combining anything, so a damaged or partially copied backup is found while the source data still exists. Record which manifest version and PostgreSQL version produced each backup, because a chain should be verified with tooling from the same release line.

Continuous archiving docs

Confirm the chain is complete

An incremental backup depends on the backup it was taken against and on every link back to the full backup. Check that each backup_label references a parent that still exists, that no backup directory was pruned by retention, and that the WAL summaries needed for each incremental interval were kept. A missing link usually shows up only at restore time, so test the chain as a whole.

Combine into a scratch directory

Run pg_combinebackup with the full backup first and the incrementals in order, writing to an empty scratch directory rather than the live data path. Keep the command, the source list and the exit status in the evidence record. Confirm free disk space before starting, because the output is a complete data directory of the same size as a full backup.

Start the restored instance

Start the combined directory on a separate host or port with archive mode and any automatic recovery settings deliberately disabled, so it cannot push archives or connect to production. Check that the server reaches a consistent state, that the expected databases and roles exist, and that the log has no checksum or missing file errors. Run a few row counts or known-value queries from application tables.

Run point-in-time recovery to a target

A combined base backup proves little until WAL replay works. Configure recovery with a recovery_target_time or named restore point that falls between two backups, replay archived WAL to that point, and confirm the instance stops where you asked. Check that data changes after the target are absent and data before it is present, using a transaction you recorded in production.

Keep evidence and measure timing

Store the manifest check output, the chain inventory, the combine and startup logs, and the recovery target used, with dates and the people who ran them. Measure how long combining, startup and replay take in your own environment, since these depend on hardware, storage and the amount of WAL to replay. Compare the measured times with your recovery time objective. For tool-based checks and scheduled drills, see the verification page in this group.

How the full backup, incremental backups and WAL fit together

The chain starts with a full base backup written by pg_basebackup, which produces a backup manifest. Each incremental backup is taken against the manifest of its predecessor, so the chain is only as complete as its links. Archived WAL covers the time between the last backup and the recovery target. pg_combinebackup reads the full backup and the incrementals in order and writes one full data directory, which PostgreSQL then replays WAL onto to reach the chosen point in time. Check that every link in the chain is present before relying on it.

Simplified illustration of the documented incremental backup and recovery flow.

Limits to confirm before choosing pg_basebackup incremental backups

Built-in incremental backups in PostgreSQL 17 cover a narrow part of a backup program. The cards below list what to confirm about your version, storage layout, retention, off-site copies, restore speed and chain length before you build a schedule around pg_basebackup and pg_combinebackup.

Version and support window

Incremental backups with pg_basebackup and pg_combinebackup are a feature of PostgreSQL 17. Confirm that your cluster runs 17 or a later supported major version, and check that every server in the backup chain, including any standby you take backups from, runs the same major version. Plan the upgrade path now if you run 14 or 15, since those releases reach end of support sooner than 17 does. Confirm the end-of-life date for the version you run before you commit to a schedule.

Versioning policy

Storage and tablespace layout

Before you rely on incremental backups, confirm how your data directory and tablespaces are laid out on disk and whether that layout is supported for your chosen backup targets. Test a backup and a combine on a copy that matches your tablespace mapping, because restores that remap tablespaces need extra steps. Note which filesystems and volume types you use, since snapshot-based storage may need a different approach to base backups.

Retention is your responsibility

pg_basebackup writes backups to a directory you specify and does not expire old ones. You must decide how many full backups and dependent incrementals to keep, and script the removal in a way that never deletes a full backup that a newer incremental still depends on. Ask who owns the retention policy and how it is reviewed against your recovery point target.

Off-site and immutable storage

The built-in tools do not copy backups to a second site, enforce object lock or manage immutability. You need a separate process to move each full backup and every incremental in the chain to off-site storage, verify the copy arrived intact, and keep credentials for that copy apart from the production server. Confirm who runs that job and how a missed or failed copy gets noticed.

Parallel restore and object storage

Confirm how restore runs against your hardware. Check whether the combine step and the restore fit in your recovery time window when the chain is long, and whether you can run them in parallel on your server. Also confirm whether your backup location is a local or network filesystem. Writing directly to object storage is not a native capability of these tools, so object storage needs its own transfer step and a tested restore from it.

Chain length against recovery time

Each incremental depends on the full backup and every earlier increment in its chain, so a longer chain means more files to read and combine during recovery. Set a maximum chain length from your recovery time objective, then test a restore from the longest chain you plan to keep. Write down the restore duration you measured, not the one you hoped for, and recheck it after data volume grows.

Continuous archiving docs

When pgBackRest, Barman or WAL-G still wins

Choose a dedicated tool when the backup problem is bigger than taking a copy. Native incremental backups in PostgreSQL 17 give you the manifest, the WAL summaries and the pg_combinebackup step, but they do not manage the rest of the lifecycle: how many chains you keep, when old ones expire, where copies live, how they are encrypted, and which backup is safe to delete. pgBackRest, Barman and WAL-G each provide a catalog or repository model that tracks these details for you. If your team has many clusters, needs object storage as a primary repository, or must show auditors a retention and encryption policy enforced by software rather than by a runbook, a dedicated tool is usually the better fit. Teams that run one or two clusters with local disks and a simple cron schedule may find the native path sufficient.

Each tool covers a different gap. The sibling topic on pgBackRest describes repository hosts, block incremental backups, encryption and restores from a standby, which matter when restore speed and repository size are the main concerns. Barman suits a central backup server that pulls from many instances, with streaming or rsync modes and barman-cloud for object storage. WAL-G is a fit when the repository is cloud object storage and you want base backups and WAL pushed there directly, with delta backups and rate limits. Check each tool's current support for PostgreSQL 17 incremental backups and for the manifest and summary files before you commit, because the native and tool-managed chains do not share metadata. Ask whether your chosen tool can restore a chain that was partly taken natively.

Mixing approaches is a risk if the two systems write to the same directory or delete each other's files. If you keep native chains for a few clusters and a dedicated tool for the rest, give each its own repository path, document which tool owns retention, and test a restore of each. Whichever path you pick, the restore drill is the test that counts. Record the time to restore, confirm the result with pg_verifybackup and a start-up check, and add the recovery procedure to your runbook. The sibling topic on verifying PostgreSQL backups and testing restores covers that evidence in detail.

Questions teams ask before running incremental backups

How much effort does running incremental backups with pg_basebackup take?

Most of the effort is in the first design, not in the nightly job. You need a backup schedule that alternates full and incremental runs, a place to keep every backup in the chain, WAL archiving that covers the whole period, and a restore procedure that runs pg_combinebackup before the server starts. Ongoing effort depends on how often backups run, how large the cluster is and how many chains you keep. Ask any partner to size each of these items against your recovery targets and your environment before they quote.

What drives the cost of an incremental backup setup?

Cost follows the number of environments, the number of databases and clusters in scope, how many restore paths must be documented and tested, and how much monitoring you add around the jobs. Storage and compute for backups are recurring costs you pay to your cloud or data center provider. The implementation work is usually one-time, while drills and reviews recur. Ask for a quote that separates design, build, documentation, restore rehearsal and any ongoing support, so you can see which parts repeat.

Can our own team run incremental backups without outside help?

Yes, if your team already runs PostgreSQL in production and can own the backup scripts, monitoring and restore runbook. The official documentation covers the commands and the manifest format, so the harder part is operational discipline: checking that every incremental run succeeded, keeping chains intact and rehearsing restores. Teams without a PostgreSQL DBA on call often find the restore rehearsal is the step they skip. Be honest about that gap before you decide.

What does the work need from our team?

You need access to the database servers, a repository for backup files, WAL archive storage and a named owner who can approve the recovery design. Engineers should be ready to provide the current backup schedule, retention rules, recovery point and recovery time targets, and the list of clusters and filesystems in scope. Security reviewers will also want to see who can read and delete backups. Settle these inputs before work starts, because gaps usually show up during the first restore test.

How long do setup and a restore rehearsal take in our environment?

Duration depends on cluster size, how much data changes between backups, network speed to the backup repository, the number of chains you must rehearse and how many people must sign off. Restore time grows with the amount of data that must be combined and replayed. No single duration applies to every environment, so ask for a timeline in the written scope and ask the partner to measure a restore on a copy of your largest cluster. Treat that measured number as the input to your recovery time objective.

Do incremental backups replace WAL archiving?

No. An incremental backup stores changed blocks between two backup points, but it cannot recover to a time between backups by itself. Point-in-time recovery still needs archived WAL files that cover the period from the base backup to the target time. Continuous archiving is what limits data loss between backups. Incremental backups mainly reduce the size and time of each backup run, so keep WAL archiving in place and check that the two work together during restore tests.

Is an incremental backup chain safe to delete or prune on its own?

Not without checking the chain first. Each incremental backup depends on the full backup and every incremental before it in the same chain, so removing one link can make later backups unrestorable. Retention rules must delete whole chains, and a backup should never be pruned until a newer full backup and its dependents are verified. Confirm your tooling enforces this rule, and test a restore after any retention change.

When does a dedicated backup tool make more sense than pg_basebackup?

A dedicated tool is often the better fit when you need a central repository for many clusters, encryption and object storage features built in, parallel backups and restores, or a managed retention policy. Built-in incremental backups fit well for a small number of clusters where you want fewer moving parts. Compare the options on your own targets and operating model, and review the sibling guides on pgBackRest, Barman and WAL-G before you choose.

How DeployOpen scopes and delivers PostgreSQL backup chains

DeployOpen plans, builds and hands over incremental backup chains for PostgreSQL inside infrastructure you control. We start from your recovery point and recovery time targets, then design the base backup, incremental schedule, WAL archiving and restore procedure around them.

How we scope

  • Written scope covers the PostgreSQL major versions, cluster topology and backup storage locations in your environment
  • Scope defines the full and incremental schedule, WAL archiving setup and the chain retention you need to keep
  • Scope names the restore test, timing evidence and runbook deliverables agreed before any build work starts

How we build

  • We enable WAL summarization and configure backup manifests so each incremental backup can be checked against its base
  • We script pg_basebackup runs with the incremental option and record each backup in a chain inventory
  • We rehearse pg_combinebackup on copies of your chains, then confirm the combined data directory starts and passes checks

How we hand over

  • You receive documented chain layout, manifest and verification steps, and the commands used in each stage
  • Restore runbooks state the order of backups to combine and the point-in-time recovery steps that follow
  • Handover includes a tested restore walkthrough so your team can repeat the procedure without DeployOpen present

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Retainers can cover scheduled restore drills, checks after each PostgreSQL minor release and chain health reviews
  • Confirm with us during scoping which parts of the chain monitoring and alerting will be your team's responsibility

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.