0

Postgresql 17 added a new feature to make incremental backups. I want to use this to make daily incremental backups, however I am struggling to find a good method for automatization, as the build in pg_basebackup --incremental always needs a path to the last incremental backup. Providing the path is easy for normal operation, however, I don't want to implement error handling for all cases where something could go wrong.

I have also looked into barman, which has support for incremental block level backups, however I don't need to pair it with WAL archiving (which I could not turn off) and it seems like I still need to manually trigger the backup anyway. pgBackRest seems to have no support for these backups at all.

Maybe there is a better alternative than using the build in incremental backup, however it seems to fit my requirements almost perfectly:

  • Large DB (>1TB) and limited backup space
  • Cannot shut the DB down
  • No big problem if one day of data would be lost

Is there any tool that I am missing that could handle my problem?

1 Answer 1

2

You cannot use incremental backups without a WAL archive.

pgBackRest has its own implementation for incremental backups, but that also needs a WAL archive.

You can guess what my recommendation is: get a WAL archive.

6
  • Is that a limitation of barman, or does pg_basebackup --incremental require it? Commented Jan 31 at 12:52
  • I don't know barman, and I don't understand the question. Commented Jan 31 at 13:24
  • As far as I understand the postgres documentation, pg_basebackup --incremental requires WAL summaries, but nothing more. Commented Jan 31 at 13:36
  • Yes, exactly. But recovering with the backup requires a WAL archive. You have to be able to replay WAL from the start of the backup to the end. Commented Jan 31 at 13:42
  • But if I don't mind losing the data from my last backup until the moment where I want to recover, I don't technically need to replay the WAL or am I wrong? Commented Jan 31 at 14:50

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.