Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgbackrest host is not getting used for multiple clusters #576

Closed
kumarashish071092 opened this issue Feb 15, 2024 · 4 comments
Closed

pgbackrest host is not getting used for multiple clusters #576

kumarashish071092 opened this issue Feb 15, 2024 · 4 comments

Comments

@kumarashish071092
Copy link

I have multiple environments such as dev, qa, and UAT . All the environments have two node clusters but pgbackrest host is shared by all.

When I execute the deploy_cluster.yml playbook, the global is set to repo1-path and it follows for all environments hence only one environment is visible and the rest are giving the below errors:

postgres@pgbackrest:~$ pgbackrest backup --type=full --stanza=supplier-connect-qa
WARN: configuration file contains invalid option 'include-path'
2024-02-15 10:35:37.779 P00   INFO: backup command begin 2.49: --archive-check --no-archive-copy --backup-standby --exec-id=2477007-fbadf106 --log-level-console=info --log-level-file=detail --log-path=/var/log/pgbackrest --pg1-host=10.X.X.X --pg2-host=10.X.X.X --pg1-path=/mnt/Postgres/postgresql/15/supplier-connect-qa/data --pg2-path=/mnt/Postgres/postgresql/15/supplier-connect-qa/data --pg1-port=35432 --pg2-port=35432 --repo1-block --repo1-bundle --repo1-path=/mnt/Postgres/pgbackrest/supplier-connect-dev --repo1-retention-archive=4 --repo1-retention-full=4 --repo1-type=posix --no-resume --stanza=supplier-connect-qa --start-fast --stop-auto --type=full
ERROR: [055]: unable to load info file '/mnt/Postgres/pgbackrest/supplier-connect-dev/backup/supplier-connect-qa/backup.info' or '/mnt/Postgres/pgbackrest/supplier-connect-dev/backup/supplier-connect-qa/backup.info.copy':
       FileMissingError: unable to open missing file '/mnt/Postgres/pgbackrest/supplier-connect-dev/backup/supplier-connect-qa/backup.info' for read
       FileMissingError: unable to open missing file '/mnt/Postgres/pgbackrest/supplier-connect-dev/backup/supplier-connect-qa/backup.info.copy' for read
       HINT: backup.info cannot be opened and is required to perform a backup.
       HINT: has a stanza-create been performed?
2024-02-15 10:35:37.780 P00   INFO: backup command end: aborted with exception [055]

how can I set up my backrest config which can create separate repos for all environments such as :

/mnt/Postgres/pgbackrest/supplier-connect-dev
/mnt/Postgres/pgbackrest/supplier-connect-qa
/mnt/Postgres/pgbackrest/supplier-connect-uat

@vitabaks
Copy link
Owner

vitabaks commented Feb 15, 2024

The repo1-path must be the same in all configurations of the database server and backup repository. I don't see any problems with repo1-path being for example /mnt/data/pgbackrest

Backups will be distributed to different directories according to the stanza name, so it is enough to have a unique stanza name for each cluster (see pgbackrest_stanza variable).

@vitabaks
Copy link
Owner

I usually use different pgbackrest servers for different environments.

@kumarashish071092
Copy link
Author

kumarashish071092 commented Feb 16, 2024 via email

@kumarashish071092
Copy link
Author

kumarashish071092 commented Feb 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants