How to import the server list from pgAdmin 3 to pgAdmin 4

pgadmin

I wonder whether there is any way to import my server list from pgAdmin 3 to pgAdmin 4 (so that I don't have to create servers one by one again).

Best Answer

For Windows in C:\Users\%user%\AppData\Roaming\pgAdmin you can find pgadmin4.db which is where pgAdmin4 saves its configuration. It is SQLite format 3 and with SQLite browser you can open it and insert servers into server table and then save and they are added to pgAdmin4. Note that passwords are saved encrypted so leave NULL to input them later. Now you could make sql script that reads registry export from pgAdmin III and inserts into table for fully automated process.