I am setting up pgbackrest to save wal archives to S3. I have two machines. When I used to take backup on the localhost, I am able to save it to S3. However, when I initiate backup from 'backup server' it fails.
Backup server config:
[global]
repo1-path=/var/lib/pgbackrest
repo1-retention-full=1
process-max=2
log-level-console=info
log-level-file=debug
start-fast=y
#stop-auto=y
repo2-path=/repo_my1
repo2-type=s3
repo2-s3-endpoint=s3.amazonaws.com
repo2-s3-bucket=<bucket>
repo2-s3-verify-tls=n
repo2-s3-key=<key>
repo2-s3-key-secret=<secret>
repo2-s3-region=us-west-2
repo2-retention-full=1
[db-primary]
pg1-path=/var/lib/pgsql/11/data
pg1-host=db-primary-host
pg1-host-user=postgres
[global:archive-push]
compress-level=3
Primary server (postgres server)
[global]
repo1-host=backup-host
repo1-host-user=backrest
process-max=2
log-level-console=info
log-level-file=debug
[db-primary]
pg1-path=/var/lib/pgsql/11/data
#sudo -iu backrest pgbackrest --stanza=demo --log-level-console=info check
error:
2022-05-30 16:43:52.432 P00 INFO: check repo2 configuration (primary)
2022-05-30 16:43:54.494 P00 INFO: check repo1 archive for WAL (primary)
ERROR: [082]: WAL segment 00000001000000000000002B was not archived before the 60000ms timeout
HINT: check the archive_command to ensure that all options are correct (especially --stanza).
HINT: check the PostgreSQL server log for errors.
HINT: run the 'start' command if the stanza was previously stopped.
2022-05-30 16:44:54.802 P00 INFO: check command end: aborted with exception [082]
I setup pgbackrest and postgres as docker . when run command "pgbackrest --stanza=main check" on container pgbackrest encontered same error .
when inspect logs container postgres . I saw logs
then login to container postgresql . and in file config
pgbackrest.conf
in part[global]
add linebackup-user=postgres