Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgAdmin - Sharing DB Connection Definitions

I have a few database servers and few developers.
I have set up database connection definitions on my PC for each servers and now I want to share with other developers but I was not sure how to export and import the definitions.

I am running pgAdmin 1.10.2 on Ubuntu 10.04 (lucid).

like image 357
JHA Avatar asked Aug 12 '10 02:08

JHA


People also ask

How do you share a database on pgAdmin?

To share a server, you need to have admin privileges in pgAdmin. Once you are logged in as an admin, then you can share a server while creating a new one or you can also share an existing server. Admin users can share the server by enabling the "Shared?" option.

How do I Export pgAdmin connections?

Using pgAdmin 4 GUI¶ tool, navigate through Tools on the menu bar to click on the Import/Export Servers option. Use the Import/Export field to select the Server Groups/Servers to be imported or exported.


2 Answers

PgAdmin 4 stores the server connection details in an SQLite3 file.

In Windows this file is located at:

%APPDATA%\pgAdmin\pgadmin4.db

In Linux it lives at:

/var/lib/pgadmin4/pgadmin4.db

You can configure a custom location by editing config_local.py file.

like image 56
quasoft Avatar answered Nov 16 '22 02:11

quasoft


On Original Computer

Export the server definitions found in Windows registry found here:

Windows Key > regedit

HKEY_CURRENT_USER\Software\pgAdmin III\Servers

Right Click on Servers Folder and click Export

Leave the default radio button 'Selected Branch' the way it is. This will be how it knows where to insert it when you want to import it.

Choose a name for your file (e.g. pgadminServers) and click Save

This is the file you will use to import to another computer (which ideally has the same version of pgAdmin)

On New Computer

Make sure pgadmin is not currently open

Windows Key > regedit

File > Import > Choose your pgadminServers.reg file.

Click Ok to the alert that says 'The keys and values contained in //filepath have been successfully added to the registry.'

Close or exit the registry editor

Launch pgAdmin

like image 35
ojhurst Avatar answered Nov 16 '22 02:11

ojhurst