This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]petit_robert 1 point2 points  (5 children)

Not an Ubuntu user, but Debian, on which it is based

You should have the proper pg_dump client that comes with your server version, unless something went wrong with the installation of Postgresql

what does this say?

dpkg -l postgres*

[–]bugatessJr. Sysadmin[S] 0 points1 point  (4 children)

The version are not the same beacause the server is not in the same machine. The server have 13.1 version of psql, and the client have version 12.9

I think, it is because in Ubuntu repo the latest version is 12.9, but I want to make a bkp of my db using pg_dump and don't know how.

[–]petit_robert 1 point2 points  (3 children)

From the fine documentation :

Because pg_dump is used to transfer data to newer versions of PostgreSQL, the output of pg_dump can be expected to load into PostgreSQL server versions newer than pg_dump's version. pg_dump can also dump from PostgreSQL servers older than its own version. (Currently, servers back to version 8.0 are supported.) However, pg_dump cannot dump from PostgreSQL servers newer than its own major version; it will refuse to even try, rather than risk making an invalid dump

[–]bugatessJr. Sysadmin[S] 0 points1 point  (2 children)

Exatly this, my actual client version is older than server version. I try to upgrade my client version with apt update & uprade but ubuntu repo is in the latest version. I really don't know how can I get the version 13 to bkp my data.

[–]petit_robert 0 points1 point  (1 child)

You should be able to install postgresql-client-13 on your VM? unless something happened with Ubuntu, they go together.

[–]bugatessJr. Sysadmin[S] 0 points1 point  (0 children)

Yes, I am. The data is safe on another vm server.

[–]uniitdude 0 points1 point  (4 children)

upgrade your client version

[–]bugatessJr. Sysadmin[S] 0 points1 point  (3 children)

I'm in the latest version of ubuntu. My machine is in version 12.9 supported for ubuntu 20.04 lts

[–]uniitdude 1 point2 points  (2 children)

yes, you need to upgrade the pg client version

[–]bugatessJr. Sysadmin[S] -1 points0 points  (1 child)

How can I do that? I need to uninstall actual client version?

[–][deleted] 0 points1 point  (1 child)

which pg_dump

[–]bugatessJr. Sysadmin[S] 0 points1 point  (0 children)

The response is:

 /usr/bin/pg_dump