121

I was hoping there is a way to export DBeaver connection configurations/properties from my old machine rather than having to go through the process of recreating each one. Does anyone know how to do this?

The DBeaver version on my old machine is 6.0.3, and the version on my new machine is 6.1.x.

alex
  • 6,818
  • 9
  • 52
  • 103
jaydel
  • 14,389
  • 14
  • 62
  • 98

13 Answers13

116

I just migrated some projects from DBeaver 6.1.4 to 7.2.3 and the File > Export/Import options worked flawlessly.

The full workflow is:

  1. File > Export, under "DBeaver", select "Project", click Next
  2. Select the projects to export and click Finish
  3. Copy the output file (by default, it is generated in home folder) into the machine where the projects will be imported
  4. File > Import, under "DBeaver", select "Project", click Next
  5. Select the file generated in the previous steps, it will automatically load the projects from it.
  6. Select the projects to import, if there is any name conflict you can change the name of the imported project. Click Finish.

IMHO, very complete, easy and straightforward.

Update: after a few days of working, I realized some of the connections were not imported. I still don't know why, but it seems to be a bug. Just double check your connections after exporting and importing.

Dinei
  • 4,494
  • 4
  • 36
  • 60
  • 1
    This is the best answer. Thank you! – thebodzio Mar 31 '21 at 10:53
  • 1
    Thanks for the solution. It's good to use import/export functionality provided by Dbeaver instead of doing it manually by locating the Dbeaver data directory and using it in new Dbeaver setup. That directory might contain some unnecessary data e.g. logs, temporary files etc. If there is version mismatch, copying data manually might result in some abnormal behavior. – Tushar R. May 19 '22 at 07:46
59

My experience on Windows 10 x64 for migrate connections from DBeaver 5.1.2 to DBeaver 6.1.5:

File | Export and File | Import functionality is (at least) not easy/clear. (Where are the "connection strings"? What should I export?)

So, I found these files:

  • DBeaver 5:

    C:\Users\user-123\.dbeaver4\General\.dbeaver-data-sources.xml

    (it was clearly updated from version 4)

  • DBeaver 6:

    C:\Users\user-456\AppData\Roaming\DBeaverData\workspace6\General\.dbeaver\data-sources.json

So, I have to manually extract the data from XML and put in the JSON.
I hope you have the JSON configuration file for both 6.3 and 6.1.x.

Hope it helps.

StackzOfZtuff
  • 2,534
  • 1
  • 28
  • 25
Alex 75
  • 2,798
  • 1
  • 31
  • 48
52

On OSX (Mac) here:

/Users/${USER}/Library/DBeaverData/workspace6/General/.dbeaver/
dkb
  • 4,389
  • 4
  • 36
  • 54
Hunor Kovács
  • 1,062
  • 9
  • 16
39

On Ubunutu, For Dbeaver 6, it is found in

$HOME/.local/share/DBeaverData/workspace6/General/.dbeaver
nitzien
  • 1,117
  • 9
  • 23
21

For Microsoft Windows users the files can be found under:

C:\Users\your_user_name\AppData\Roaming\DBeaverData\workspace6\General\.dbeaver
Marcell
  • 809
  • 8
  • 23
  • Thanks, this helped me find the file. However, there is something else at play here... because DBeaver just started up without showing my connections, that were still visible in this .dbeaver file. I think there is some sort of correlation with project folders too, but a missing or moved project folder seems to lead to issues with not showing connections? – Nij Oct 21 '20 at 05:57
12

DBeaver connections are stored in file .dbeaver-data-sources.xml, in DBeaver workspace, which is in %{HOME/.dbeaver4/General/ by default.

Nifriz
  • 1,033
  • 1
  • 10
  • 21
9

In my case the path is:

C:\Users\user\AppData\Roaming\DBeaverData\workspace6\General\.dbeaver

If the folder .dbeaver does not exist in a fresh installation you will need to create.

The beaver version: 7.3

Consule
  • 1,059
  • 12
  • 12
8

connections are now stored in a file named data-sources.json as you can check here

on my Ubuntu I lost my connections cause I downloaded the new version using snap

I solved it just copying that file from old path ~/.local/share/.DBeaverData/workspace6/General/.dbeaver/

to my new path ~/snap/dbeaver-ce/90/.local/share/DBeaverData/workspace6/General/.dbeaver

ivoroto
  • 925
  • 12
  • 12
7

Ubuntu 20.04, Snap installed: Dbeaver version: 7.1.2

Connections: ~/snap/dbeaver-ce/61/.local/share/DBeaverData/workspace6/General/.dbeaver/

Scripts: /home/shiwakant/snap/dbeaver-ce/61/.local/share/DBeaverData/workspace6/General/Scripts/

2

I've just tried to move configuration for dbeaver 7.3.1 from one win machine to another, and if you copy&paste folder:

C:\Users\your_user_name\AppData\Roaming\DBeaverData\

you will get everything works quite smoothly

jkarisik
  • 31
  • 1
  • 3
2

If you're using the Windows Store DBeaver CE Application on Windows 10 the workspace folder is different because of the app sandboxing and looks like this:

C:\Users\<USERNAME>\AppData\Local\Packages\DBeaverCorp.DBeaverCE_<SANDBOXING_HASH>\LocalCache\Roaming\DBeaverData\workspace6\

Then you can follow the Wiki instructions here:

https://dbeaver.com/docs/wiki/Admin-Manage-Connections/

1

On Windows, just copy these folders and files from the location %APPDATA%\DBeaverData\workspace6\General:

  • .dbeaver\
  • Scripts\
  • .dbeaver-data-sources.xml

Paste it at the target (a new installation of DBeaver doesn't have the above file and folders). The connections will appear and work. I just tested this a few minutes ago and wanted to document it.

Joseph
  • 2,155
  • 6
  • 20
  • 32
0

DBeaver 6.1.3+

+project connections in the file:C:\Users\ [USER]\AppData\Roaming\DBeaverData\workspace6\General.dbeaver\data-sources.json

+All secured information files: C:\Users\ [USER]\AppData\Roaming\DBeaverData\workspace6\General.dbeaver\credentials-config.json

BongSey
  • 171
  • 1
  • 6