FIX: pg_basebackup parameter in take-database-backup (#611)
authorGrant <github@firefishy.com>
Thu, 24 Mar 2022 22:51:41 +0000 (22:51 +0000)
committerGitHub <noreply@github.com>
Thu, 24 Mar 2022 22:51:41 +0000 (18:51 -0400)
take-database-backup tries to use pg_baseback --xlog parameter which
was remove in postgres >=10.

templates/postgres.10.template.yml
templates/postgres.12.template.yml
templates/postgres.13.template.yml
templates/postgres.template.yml

index 358d641790727cc14002833bb1e0506264926ae3..89df40f479477b2e6f3c5122ebe2d750cd0e4189 100644 (file)
@@ -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:
index da9abf383c183cf3fc055f4511945c86e9ea2bff..4482c8acc38d21fbf7cc1d93e005ce1d8aa5010c 100644 (file)
@@ -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:
index 478f0645442b038bda94122fb6922f52a6e39bdd..14146296e9446e63ba1c9ca5dcd6b8c9a8c887d5 100644 (file)
@@ -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:
index 478f0645442b038bda94122fb6922f52a6e39bdd..14146296e9446e63ba1c9ca5dcd6b8c9a8c887d5 100644 (file)
@@ -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: