Suite à ce commentaire et celui-ci, je m'adresse dans cette note à Anarcat (francophone) et Martín Marqués pour expliquer ce que j'essaie de faire dans le POC https://github.com/stephane-klein/poc-barman, ce que j'ai réussi à faire et présenter aussi mes difficultés.
J'ai traduit cette note en anglais et je l'ai postée sur "GitHub Barman discussion" : https://github.com/EnterpriseDB/barman/discussions/1067.
Mon objectif dans le repository poc-barman est d'essayer d'utiliser barman dans un container Docker sidecar pour sauvegarder un container PostgreSQL.
Une de mes contraintes est d'effectuer un minimum de changements au niveau du container PostgreSQL que je souhaite sauvegarder. Je souhaite pouvoir utiliser une image Docker PostgreSQL mainstream https://hub.docker.com/_/postgres, sans changement.
Je souhaite utiliser le mode de sauvegarde de barman nommé streaming backups method: backup_method = postgres qui se base sur la commande pg_basebackup (commande officielle intégrée à PostgreSQL).
Je souhaite utiliser la nouvelle fonctionnalité pg_basebackup --incremental... de la version 17 de PostgreSQL.
Voici ma configuration de barman : https://github.com/stephane-klein/poc-barman/blob/4df58ecc5af6d2d1f7607c364400f8c5ba012496/docker-compose.yml#L15
Et voici ma configuration de PostgreSQL 17 :
J'ai implémenté un script nommé ./scripts/reset.sh qui effectue un test de bout automatiquement.
Voici son screencast :
Voici ce qu'il fait :
postgres1 et barman et injecte quelques données dans postgres1barmanpostgres1postgres2 et lance postgres2 et affiche les données de la table dummypostgres1postgres1 en utilisant pg_combinebackup vers postgres2 préalablement coupé et effacépostgres2 basé sur la restauration de la sauvegarde incrémentielleQuestions que je me pose :
Voici ci-dessous la version anglaise posté ici.
Subject: Streaming Incremental Backup Configuration with PostgreSQL 17 using Docker Sidecar
Hello,
In the poc-barman repository, I'm trying to use barman in a Docker sidecar container to backup a PostgreSQL container.
One of my constraints is to make minimal changes to the PostgreSQL container that I want to backup. I want to be able to use a mainstream Docker PostgreSQL image https://hub.docker.com/_/postgres, without modifications.
I want to use the barman backup mode called streaming backups method: backup_method = postgres which is based on the pg_basebackup command (official command integrated into PostgreSQL).
I want to use the new pg_basebackup --incremental... feature from PostgreSQL version 17.
Here is my barman configuration: https://github.com/stephane-klein/poc-barman/blob/4df58ecc5af6d2d1f7607c364400f8c5ba012496/docker-compose.yml#L15
And here is my PostgreSQL 17 configuration:
I implemented a script called ./scripts/reset.sh that performs an end-to-end test automatically.
Here's its screencast:
Here's what it does:
postgres1 and barman containers and injects some data into postgres1barmanpostgres1postgres2, starts postgres2, and displays the data from the dummy tablepostgres1postgres1 backup using pg_combinebackup to postgres2 which was previously stopped and erasedpostgres2 based on the incremental backup restorationQuestions:
Best regards,
Stephane