pg_dump version mismatch with openshift template
When using gitlab on openshift via : #1305 (closed)
# gitlab-rake gitlab:backup:create
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... pg_dump: server version: 9.4.9; pg_dump version: 9.2.18
pg_dump: aborting because of server version mismatch
[FAILED]
Backup failed
The pg_dump is from the gitlab-ce package :
# pg_dump --version
pg_dump (PostgreSQL) 9.2.18
# dpkg -S pg_dump
gitlab-ce: /opt/gitlab/embedded/postgresql/9.6.1/bin/pg_dumpall
gitlab-ce: /opt/gitlab/embedded/postgresql/9.2.18/bin/pg_dumpall
gitlab-ce: /opt/gitlab/embedded/postgresql/9.2.18/bin/pg_dump
gitlab-ce: /opt/gitlab/embedded/postgresql/9.6.1/bin/pg_dump
gitlab-ce: /opt/gitlab/embedded/bin/pg_dump
gitlab-ce: /opt/gitlab/embedded/bin/pg_dumpall
pg_dump is a link to 9.2.18 :
# ls -l /opt/gitlab/embedded/bin/pg_dump
lrwxrwxrwx. 1 root root 50 Mar 1 12:56 /opt/gitlab/embedded/bin/pg_dump -> /opt/gitlab/embedded/postgresql/9.2.18/bin/pg_dump
If I try :
ln -s /opt/gitlab/embedded/postgresql/9.6.1/bin/pg_dump /opt/gitlab/embedded/bin/pg_dump
It seems to work correctly
This is similar to #1847 (closed) , but on Openshift. As the pod is ephemeral, this link change is not persisted.
I think also that in template https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/docker/openshift-template.json another persisten volume gitlab-ce-backup
should be mount on /var/opt/gitlab/backups