From 62b009bafacce830bc9902611547141c64eb8beb Mon Sep 17 00:00:00 2001 From: Grant Date: Thu, 24 Mar 2022 22:51:41 +0000 Subject: [PATCH] FIX: pg_basebackup parameter in take-database-backup (#611) take-database-backup tries to use pg_baseback --xlog parameter which was remove in postgres >=10. --- templates/postgres.10.template.yml | 2 +- templates/postgres.12.template.yml | 2 +- templates/postgres.13.template.yml | 2 +- templates/postgres.template.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/postgres.10.template.yml b/templates/postgres.10.template.yml index 358d641..89df40f 100644 --- a/templates/postgres.10.template.yml +++ b/templates/postgres.10.template.yml @@ -155,7 +155,7 @@ run: #!/bin/bash ID=db-$(date +%F_%T) FILENAME=/shared/postgres_backup/$ID.tar.gz - pg_basebackup --format=tar --pgdata=- --xlog --gzip --label=$ID > $FILENAME + pg_basebackup --format=tar --pgdata=- --wal-method=fetch --gzip --label=$ID > $FILENAME echo $FILENAME - file: diff --git a/templates/postgres.12.template.yml b/templates/postgres.12.template.yml index da9abf3..4482c8a 100644 --- a/templates/postgres.12.template.yml +++ b/templates/postgres.12.template.yml @@ -154,7 +154,7 @@ run: #!/bin/bash ID=db-$(date +%F_%T) FILENAME=/shared/postgres_backup/$ID.tar.gz - pg_basebackup --format=tar --pgdata=- --xlog --gzip --label=$ID > $FILENAME + pg_basebackup --format=tar --pgdata=- --wal-method=fetch --gzip --label=$ID > $FILENAME echo $FILENAME - file: diff --git a/templates/postgres.13.template.yml b/templates/postgres.13.template.yml index 478f064..1414629 100644 --- a/templates/postgres.13.template.yml +++ b/templates/postgres.13.template.yml @@ -229,7 +229,7 @@ run: #!/bin/bash ID=db-$(date +%F_%T) FILENAME=/shared/postgres_backup/$ID.tar.gz - pg_basebackup --format=tar --pgdata=- --xlog --gzip --label=$ID > $FILENAME + pg_basebackup --format=tar --pgdata=- --wal-method=fetch --gzip --label=$ID > $FILENAME echo $FILENAME - file: diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 478f064..1414629 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -229,7 +229,7 @@ run: #!/bin/bash ID=db-$(date +%F_%T) FILENAME=/shared/postgres_backup/$ID.tar.gz - pg_basebackup --format=tar --pgdata=- --xlog --gzip --label=$ID > $FILENAME + pg_basebackup --format=tar --pgdata=- --wal-method=fetch --gzip --label=$ID > $FILENAME echo $FILENAME - file: -- 2.25.1