TransWikia.com

gitlab pg_dump version mismatch

Server Fault Asked by ProjectPaatt on December 11, 2021

I just recently transfered a gitlab instance to a new server. I thought everything was fine until I went to apt upgrade and the backup failed.

Dumping PostgreSQL database gitlab ... pg_dump: server version: 12.2 (Ubuntu 12.2-4); pg_dump version: 11.7
pg_dump: aborting because of server version mismatch

system info
It is connected to postgresql db on the system and not the gitlab-builtin bundled version

this is also gitlab’s bionic repo despite the system being focal because it seems they dont actually have focal support quite ready at this time. (packages missing)

System information
System:         Ubuntu 20.04
Current User:   git
Using RVM:      no
Ruby Version:   2.6.6p146
Gem Version:    2.7.10
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  5.0.9
Git Version:    2.27.0
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information
Version:        13.1.4
Revision:       18c5ab32b73
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     12.2

where is this 11.7 coming from? What do I do to resolve this?
a pg_dump --version returns pg_dump (PostgreSQL) 12.2 (Ubuntu 12.2-4). This is a fresh server install and has never had other pgsql servers installed.

bonus question: do i need to care about Go Version: unknown? It’s the same on the old server.

One Answer

GitLab was using a packaged version of pg_dump. After finding it out from GitLab - Database - Backup and restore a non-packaged PostgreSQL database

running this solved the issue

sudo ln -s /usr/bin/pg_dump /usr/bin/psql /opt/gitlab/bin/

Answered by ProjectPaatt on December 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP