Ubuntu Dbeaver backup database [closed]
Asked Answered
M

7

74

I have Dbeaver installed and I have a connection to a PostgreSQL database on a remote server.
I'd like to export this database to my local PC but when I go to Tools -> Backup database I see an error

Client home is not specified for connection

What should I specify and where? I can't find anything about it in the documentation.

Mokas answered 4/1, 2017 at 23:20 Comment(1)
I’m voting to close this question because this is not about programming; it might be a good fit for Database AdministatorsStruble
A
59

I use Windows 7, so maybe it doesn't work the same way, but it is worth a try. First you have to install your local postgresql server. When this is done, it's quite simple, just make a rightclick on your PostgreSQL connection and then click on "Edit Connection". Here you can choose your local client.

I must say, I've search long enough for this on my own. Hope it helps.

And it is my first post, so sorry if I did something wrong.

Screenshot Server Connection:

Screenshot Server Connection

Screenshot Edit Settings:

Screenshot Edit Settings

Assiduity answered 9/2, 2017 at 16:11 Comment(5)
but for me in the local client : "/usr/bin/" working fine. Ubunt 16.04Ripplet
I have struggled a lot with this error on macOS! - I have installed mysql via homebrew, and I did not know what folder to set as Client Home. Eventually this worked for me: /usr/local/opt/mysqlPriapus
How to get local postgresql??Donatello
In macOS i found it under /usr/local , my installation it was done with Postgres.appMatelot
local client : "/usr/bin/" worked for Ubuntu 19.04 and mysql version 8.0 as wellConservatory
L
23

I found this solution using ubuntu linux:

look for pg_dump running this command as root

find / -name "pg_dump"

in my case, the relevant result is /usr/lib/postgresql/12/bin/pg_dump

Then, in "Connection Settings" as other answers here, click on "browse" and browse to /usr/lib/postgresql/12/bin/pg_dump or the location resulted on the previous step.

Landgraviate answered 8/5, 2020 at 13:29 Comment(4)
This was my exact issue too. When running Ubuntu 20.4 and Postres 12Eliezer
what if the postgres is in docker container? sorry its late I Know. hope someone could help. thank youChina
@JackySupit it is the same, I'm actually using a docker container.Landgraviate
If you download just by doing sudo apt install dbeaver-ce, you will not be able to set this path (dbeaver will not get write access to any bin directories). So, just properly follow the instructions given here dbeaver.io/download and you will be able to follow above answer.Sheasheaf
S
19

MAC specific answer

I ran into the same issue. Essentially, DBeaver needs to know where the postgresql bin is located. It contains things like pg_dump which the backup tool depends on. If you don't have PostgreSQL installed, then I'd recommend installing via: postgresapp.com

For version 11, as of this comment, the lib installation will be located here: /Applications/Postgres.app/contents/versions/11/bin.

Versions installed with brew are located in /usr/local/bin/postgres.

So within DBeaver you'll want to edit the DB connection properties to reflect the below screenshot. You'll be prompted to reconnect to your DB, but then you should be good to go.

Hope this helps.

enter image description here

Stratify answered 6/5, 2019 at 23:46 Comment(2)
This way it works too, so you can use the "/usr/bin/" directory or this. I do not know if is there a difference.Matelot
another mac spesific answer; You could also use homebrew to install libpq. brew install libpq This would give you psql, pg_dump and a whole bunch of other client utilities without installing Postgres. if use zsh: echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc source ~/.zshrc if use bash: echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profileLibelee
A
15

Linux Specific Answer

  • Install PostgreSQL client locally
  • Open the terminal and type which pg_dump and it will return something like /usr/bin/pg_dump
  • In local client settings select browse and add the folder from the previous step. In my case it was /usr/bin/. Wait a few seconds it will detect the driver
Armyn answered 29/6, 2021 at 13:48 Comment(1)
sudo apt install postgresql-client-common might be required if pg_dump not found and sudo apt-get install postgresql-client for default clientBobette
L
4

For Mac,

Right click on your connection -> "Edit Connection". (see image) 1

For local client, click browse (see below) 2

To see hidden file and folders, press "cmd + shift + ." Now you can browse to PG bin folder. Path will be added to local client. After adding, select that path and you will see id, path, and name will be populated (see image) 3

Linolinocut answered 13/5, 2020 at 21:9 Comment(0)
S
2

Postgres SQL installed using Enterprise DB installer on Mac OS, pg_restore will be located in /Library/PostgreSQL/10/bin..

So select this location in DBeaver

screenshot for reference

It worked for me..

Scyphozoan answered 16/8, 2019 at 13:23 Comment(0)
G
0

In Ubuntu 20.04,Add Local Client value as '/user' (in Connection settings -->main)

Greenockite answered 8/9, 2021 at 17:3 Comment(1)
Please provide additional details in your answer. As it's currently written, it's hard to understand your solution.Alysiaalyson

© 2022 - 2024 — McMap. All rights reserved.