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

ERROR: [031]: invalid option '--pg1-local' #1218

Closed
sujithtee opened this issue Oct 27, 2020 · 5 comments
Closed

ERROR: [031]: invalid option '--pg1-local' #1218

sujithtee opened this issue Oct 27, 2020 · 5 comments
Assignees
Labels

Comments

@sujithtee
Copy link

sujithtee commented Oct 27, 2020

Please provide the following information when submitting an issue (feature requests or general comments can skip this):

  1. pgBackRest version:2.30

  2. PostgreSQL version: PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit

  3. Operating system/version - if you have more than one server (for example, a database server, a repository host server, one or more standbys), please specify each: CentOS Linux release 7.6.1810 (Core)

  4. Did you install pgBackRest from source or from a package? installed via rpm

  5. Please attach the following as applicable:

    • pgbackrest.conf file(s)
      standby:
      [global]
      repo1-path=/path
      start-fast=y
      #backup-standby=y
      repo1-retention-full=1
      repo1-retention-diff=1
      archive-async=y
      log-level-file=detail
      repo1-cipher-pass=
      repo1-cipher-type=aes-256-cbc

[global:archive-push]
compress-level=3
process-max=2

[cluster_pg]
pg1-host=x.x.x.x
pg1-path=/dbpath1
pg2-path=/dbpath2
recovery-option=standby_mode=on
recovery-option=primary_conninfo=host=x.x.x.x user=user passfile=/var/lib/pgsql/passwordfile
recovery-option=recovery_target_timeline=latest

Master:
[global]
repo1-path=/path
repo1-cipher-pass=
repo1-cipher-type=aes-256-cbc
repo1-retention-full=1
repo1-retention-diff=1
start-fast=y
archive-async=y
log-level-file=detail

[global:archive-push]
compress-level=3
process-max=2

[cluster_pg]
pg1-path=/dbpath

- errors in the postgresql log file before or during the time you experienced the issue
- log file in `/var/log/pgbackrest` for the commands run (e.g. `/var/log/pgbackrest/mystanza_backup.log`)

2020-10-27 18:45:28.541 P00 INFO: backup command begin 2.30: --backup-standby --log-level-console=detail --log-level-file=detail --pg1-host=x.x.x.x --pg1-path=/dbpath1 --pg2-path=/dbpath2 --repo1-cipher-pass= --repo1-cipher-type=aes-256-cbc --repo1-path=/path --repo1-retention-diff=1 --repo1-retention-full=1 --stanza=cluster --start-fast --type=full
WARN: unable to check pg-1: [OptionInvalidError] remote-0 process on 'x.x.x.x' terminated unexpectedly [31]: ERROR: [031]: invalid option '--pg1-local'
ERROR: [056]: unable to find primary cluster - cannot proceed
2020-10-27 18:45:29.448 P00 INFO: backup command end: aborted with exception [056]
7. Describe the issue:
After the configuration, when I start running the pgbackrest its giving me a unknown error that --pg1-local option is invalid, I didn't mention such option in config, also there is no such option from doc as well.

@dwsteele dwsteele self-assigned this Oct 27, 2020
@dwsteele
Copy link
Member

Looks like you did not upgrade all your hosts to 2.30. Yes, this is a bad error message and we are working on it.

@cmwshang
Copy link
Contributor

Although it is likely all your hosts did not get updated, your configuration also looks a little strange. It appears you have a standby and a primary but the standby stanza configured is [cluster] but on the primary it is [cluster_pg] and where is your repo-host?

@sujithtee
Copy link
Author

sujithtee commented Oct 28, 2020

It is cluster_pg only in master and standby. During the deletion of confidential information I deleted it by mistake. Updated the question now.
Earlier I had 2.29 on master and standby and faced the same issue, now standby is only on 2.30. do I need to upgrade master and check?
Also We didn't mention repo-host in any of our other implementations and working fine(version 2.13 and 2.17), we have a NFS.

@dwsteele
Copy link
Member

When pgBackRest is operating among multiple hosts the versions must be the same. It's OK if a unrelated cluster is using a different version.

@sujithtee
Copy link
Author

Thanks for the comments. Working fine after installing same version on both master and standby.

@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants