I have restored basic backup successfully of Postgres. However, after that I have tried to restore incremental backup of Postgres(it was a couple of write to test table), and it had a couple of WAL files and some WAL files with .backup at the end. I have tried to put them into my pg_wal archive directory, that I'm using in the following restore command at postgresql.conf:

wal_level = replica
max_connections = 100
archive_mode = on
archive_command = 'test ! -f /var/lib/postgresql/16/main/pg_wal/wal_archive/%f && cp %p /var/lib/postgresql/16/main/pg_wal/wal_archive/%f'
restore_command = 'cp /var/lib/postgresql/16/pg_wal/wal_archive/%f %p

After putting them into /var/lib/postgresql/16/pg_wal/wal_archive I have tried to restart a couple times postgresql, however my new added WAL files still was not applied. Worth to mention that it seems like restarts did not trigger recovery mode, as restore_command usually executed from that mode.

Any help or advices is greatly appreciated!

1 Answer 1


What you describe is not an incremental backup; what you are trying to do is called "point in time recovery", which you initiate by placing a recovery.signal in the Postgres data directory and restarting the server. There are more details to how that works, which you can find in the docs.

Until the incremental backup/restore functionality makes it to Postgres 17, the only other option is to use pgBackRest.

  • Incremental backup has already made it into v17. Feb 26 at 8:32
  • Yeah byt v17 hasn't made it to the release yet, has it?
    – mustaccio
    Feb 26 at 12:57
  • Right. Perhaps I misunderstood; it sounded like you were saying that it isn't in v17 yet. Feb 26 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.