Skip to content

archive command get an error #204

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

Closed
tengilim opened this issue May 11, 2020 · 22 comments
Closed

archive command get an error #204

tengilim opened this issue May 11, 2020 · 22 comments
Labels
Milestone

Comments

@tengilim
Copy link

Hi;

When I set up backup environment with pg_probackup  the archive command get an error. 

Error:

DETAIL: The failed archive command was: /usr/bin/pg_probackup-10 archive-push -B /dbbackupsisi/PGBackups/pg_probackup --instance YYYY --wal-file path=pg_wal/00000005000000B9000000F9 --wal-file-name=00000005000000B9000000F9 --remote-host=XXXX
ERROR: -B, --backup-path must be a path to directory

archive command:

archive_command = '/usr/bin/pg_probackup-10 archive-push -B /dbbackupsisi/PGBackups/pg_probackup/ --instance YYYY --wal-file-path=%p --wal-file-name=%f --remote-host=XXXX'

I have no idea what the problem is...

Thank you..

@gsmolk
Copy link
Contributor

gsmolk commented May 11, 2020

Hello!
Please run the following command on backup server and post the output:

stat /dbbackupsisi/PGBackups/pg_probackup

@tengilim
Copy link
Author

Hi;
output is below

File: ‘/dbbackupsisi/PGBackups/pg_probackup’
Size: 0 Blocks: 0 IO Block: 16384 directory
Device: 25h/37d Inode: 9867272491 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 26/postgres) Gid: ( 0/ root)
Access: 2020-04-21 15:58:34.133956900 +0300
Modify: 2020-04-21 15:58:34.133956900 +0300
Change: 2020-04-21 15:58:34.133956900 +0300
Birth: -

backups of 4 different servers are taken over this backup server. So I have 4 instance... This is the fifth server and fifth instance. There was no problem with other servers but I had such a problem with this server.

@gsmolk
Copy link
Contributor

gsmolk commented May 11, 2020

That is strange, how directory can be of size 0?

@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

I can provide you with package of custom binary, that will report additional information to further investigate this problem

@tengilim
Copy link
Author

Other backups and archive wal files are taken to the same place, but there is no problem with them.

@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

What is the pg_probackup version you are using?

@tengilim
Copy link
Author

on backup_server
pg_probackup-10 2.2.7 (PostgreSQL 10.10)

on postgres server
pg_probackup-10 2.3.1 (PostgreSQL 10.12)

@alexign
Copy link

alexign commented May 12, 2020

Hello @tengilim !
Is the same version of probackup installed on all postgresql server you’ve mentioned above?

@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

I`ve managed to reproduce your issue.
pg_probackup requires that binaries on local and remote systems to be of the same version.
Version mismatch should be detected and error issued:

ERROR: Agent error: ERROR: Agent version 2.3.2 doesn't match master pg_probackup version 2.2.7

BUT it appears that in case of archive-push version matching works incorrectly. It is a bug.
You should either update your backup server binary to 2.3.1 or downgrade binary on postgres server to 2.2.7

@tengilim
Copy link
Author

I think minor versions are different. I installed the pg_probackup the latest postgresql server 2 days ago. this server's pg_probackup version is 2.3.1 . The other postgresql server's and backup server's pg_probackup version is 2.2.7 . So just minor version is different

@tengilim
Copy link
Author

"downgrade binary on postgres server to 2.2.7" how can I do this?

@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

"downgrade binary on postgres server to 2.2.7" how can I do this?

What OS you are using?

@tengilim
Copy link
Author

centOS7

@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

  1. You must edit repo file /etc/yum.repos.d/pg_probackup.repo and change latest to 2.2.7:
    baseurl=https://repo.postgrespro.ru/pg_probackup/rpm/2.2.7/centos-$releasever-$basearch
  2. Clean cache: yum clean all
  3. Reinstall package: yum remove pg_probackup-10 && yum install pg_probackup-10

@tengilim
Copy link
Author

thank you let me try

@gsmolk gsmolk added the bug label May 12, 2020
@gsmolk gsmolk added this to the 2.3.3 milestone May 12, 2020
gsmolk added a commit that referenced this issue May 12, 2020
@gsmolk
Copy link
Contributor

gsmolk commented May 12, 2020

Did it work?

@tengilim
Copy link
Author

Yes it did. After change version I made del-instance add-instance again and now it works normaly . Thanks a lot.

@tengilim tengilim reopened this May 13, 2020
@gsmolk
Copy link
Contributor

gsmolk commented May 13, 2020

Great. I would recommend to upgrade all binaries to upcoming 2.3.3 at some point.

@tengilim
Copy link
Author

Maybe later. Thank you again

@gsmolk
Copy link
Contributor

gsmolk commented May 14, 2020

You are welcome

@gsmolk
Copy link
Contributor

gsmolk commented May 15, 2020

FYI 2.3.3 released

@tengilim
Copy link
Author

thank you for informing

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

No branches or pull requests

3 participants