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).
You should have a .pgadmin3 conf file in your home directory. You just need to give that one to your fellow developers.
By the way, for those looking for the answer to this question on the Windows platform, the server definitions are stored in the Windows registry at HKEY_CURRENT_USER\Software\pgAdmin III\Servers
You can export this key to a .reg file and share it. However, due to the naming of the keys, it will likely overwrite any existing keys in the target registry.
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
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.
Not enough reputation, else I would add a comment to @ojhurst
IF you leave your pgAdmin III open or have already added a server and then import the pgadminServers.reg file
Edit that file (or modify entry in registry) the following entry
[HKEY_USERS\S-1-5-21-....-1140347\Software\pgAdmin III\Servers]
"Count"=dword:0000001
to the total count of servers (e.g. 53)
[HKEY_USERS\S-1-5-21-....-1140347\Software\pgAdmin III\Servers]
"Count"=dword:0000053
精彩评论