Recommended External Backup Solution with repmgr

On the older stolon-based postgres-ha Postgres clusters, we used the included wal-g setup to manage external database snapshots and PITR.

However wal-g is currently not included in the newer repmgr-based postgres-flex, and it doesn’t look like anything has yet been included to replace it.

What would someone recommend for doing external snapshots (and ideally, PITR) on postgres-flex?
Most solutions don’t really seem viable right now as they really need to be included in the postgres-flex image to be usable.

Things I’ve looked at:

  • wal-g – Needs to run on a postgres host with direct fs access.
  • pgBackRest – Also needs to run on the postgres host with direct fs access.
  • pgBarMan – Doesn’t need to run on the postgres host… but needs SSH access to the host to transfer over rsync.

Essentially all the production-oriented backup solutions rely on using postgres’ feature to pause committing WALs, copy the the data while its not being written to, and then resume postgres.

I’d rather not maintain a derived image and break the built-in image upgrades support so right now it needs to be something that runs on a separate machine to postgres…

Right now I’m basically stuck manually performing snapshots with pg_dumpall and it’s not really a great solution:

DATE=`date +%s` ; pg_dumpall | \
  gzip -8c > all_$DATE.sql.gz && \
  aws s3 cp all_$DATE.sql.gz s3://$BACKUPS_STORAGE_BUCKET/pgdump

We don’t have a solution for that yet but it’s on our roadmap.

With barman also you can use a streaming connection to connect a barman machine to postgres to but that will require small changes over our postgres image to get working.

Ok, well it’d be really good to get something soon. wal-g worked really well for me before, so would be the direction I’d lean.

The only thing missing from the stolon-based clusters was a mechanism to schedule full backups, and garbage cleanup.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.