Tag Archives: Pg_basebackup Error

[Solved] Pg_basebackup Error: pg_basebackup: incompatible server version 12.4

pg_basebackup error

When copying data from the primary database today, PG was found_ Basebackup cannot be used. The details are as follows:

The error is: incompatible server version 12.4

[postgres@gjgx13954:/home/postgres]
$ pg_basebackup -h 172.20.139.52 -U repl -D /data6/pgdata -X stream -P -R
pg_basebackup: incompatible server version 12.4
pg_basebackup: removing contents of data directory "/data6/pgdata"

 

 I don't know the exact reason, but probably this server has more than one pg installed, and then not deleted cleanly, go to /opt /var/lib and other possible directories to find and delete the corresponding folder.
 The fix was to delete the . /pg11 and . /postgresql-11.2
 pg_basebackup again to copy the data, success