postgresqldatabase-backupsdocker-swarmbackup-strategiesbarman

Use Barman within a Docker swarm


I'm almost new to the PostgreSQL technology but today, I have a Docker swarm with two nodes dedicated for the databases. Consider that the first node contains the "master" PostgreSQL (> 9.3) and the second one is just a replica of the master.

This backup method doesn't suit me anymore since my cluster could grow up soon and I would need point in time recovery. In did some research and that's why I would like to use Barman (http://www.pgbarman.org/).

I was wondering if Barman can be efficient in a Docker swarm and if some of you had a return of experience on it.

I'm trying at the moment to build this infrastructure. I'll post updates if needed.

Additionnaly, more documentation on the topic could help me :)

Thanks, Paul


Solution

  • After some days practicing barman and reading the documentation, I think Barman is a suitable and really good option for backups in a Docker Swarm since it allows streaming backup.

    You can choose to backup every minutes a small amount of data. It's light for Docker. If there is a disaster and your PostgreSQL service comes down you can still recover from a recent backup.