When internal PostgreSQL is disabled, use external pg_dump

In my /etc/gitlab/gitlab.rb file I have the following line:

postgresql['enable'] = false

When I run the following line:

sudo gitlab-rake gitlab:backup:create

it should use external pg_dump (/usr/bin/pg_dump) but it uses internal (/opt/gitlab/embedded/bin/pg_dump)

so I get the following error:

Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... pg_dump: server version: 9.3.5; pg_dump version: 9.2.8
pg_dump: aborting because of server version mismatch
[FAILED]
Backup failed

so in order to get backup working, I had to do:

sudo cp /usr/bin/pg_dump /opt/gitlab/embedded/bin/pg_dump