Bring your connections from another tool
Bring the connections you already have into Alcuin instead of typing each one again. Alcuin reads a pgAdmin or DBeaver export, or your ~/.pgpass file. Passwords never come over from pgAdmin or DBeaver; you enter them once in Alcuin.
What you can import
Section titled “What you can import”| Source | The file |
|---|---|
| pgAdmin | A servers.json export, with a Servers object |
| DBeaver | Its data-sources.json, with a connections object. Postgres only |
| .pgpass | ~/.pgpass, or the file PGPASSFILE names in Alcuin’s environment |
To export from pgAdmin, use Import/Export Servers in its Tools menu and export to a file. DBeaver keeps data-sources.json in its workspace, in the project’s .dbeaver folder. The folder’s name starts with a dot, so in the macOS file dialog press ⌘⇧. to show it.
TablePlus and Postico can’t be imported: TablePlus keeps its connections in the keychain and has no plain export. Copy those into the form, or paste each one’s URL; see Connection URLs and .pgpass.
Import a file
Section titled “Import a file”- Open the launcher with ⌘⇧O on macOS or Ctrl+Shift+O on Windows and Linux.
- At the bottom, click Import from another tool.
- If you have a
~/.pgpassfile, a menu opens. Choose pgAdmin or DBeaver connections… for a file, or the path of your password file. When the file has nothing to import, its item is grayed out and says why. - For a file, pick the
servers.jsonordata-sources.jsonand open it.
A message says how many came in and into which projects, then anything to know about them. It stays until you close it.
What comes over
Section titled “What comes over”| Setting | pgAdmin | DBeaver | .pgpass |
|---|---|---|---|
| Name | Name | Name | user@host/database |
| Host, Port, User | Yes | Yes | Yes |
| Database | MaintenanceDB | Yes | Yes |
| Encryption | SSLMode | SSL mode | Preferred |
| Project | Its group, except pgAdmin’s default Servers group | Its folder | None |
| Environment | Production when the group or name says so | Production when the connection type, folder or name says so | Production when the name says so |
| Password | Not imported. A PassExecCmd comes over as Password from command | Not imported | Stays in the file |
| SSH tunnel | Host, port, user, and the key file or password sign-in | Host, port, user and sign-in, when the file names the user | None |
A group or folder becomes a project of the same name. Alcuin makes the project when there isn’t one yet.
An SSL mode Alcuin doesn’t know becomes Preferred. A connection without a database is given postgres.
What you enter again
Section titled “What you enter again”- Passwords. pgAdmin and DBeaver passwords stay in those tools. Right-click each connection in the launcher, choose Edit…, enter the password and save. Until then a connect uses a matching line in your
.pgpass, if it has one; otherwise it stops at Sign in withThe server asked for a password, and there was none to send. A server that signs you in without a password, bytrustorpeer, never asks. - SSH passwords and key passphrases. Enter them in the SSH fields in Edit….
- Certificate files. CA certificate, Client certificate and Client key are not imported. For a server whose CA you set in the other tool, set CA certificate again; see TLS and sslmode.
- DBeaver tunnels whose user isn’t in the file. DBeaver keeps the SSH user in its encrypted credentials, so the message says
DBeaver keeps the SSH user in its encrypted credentialsand the connection comes over without its tunnel. Set it up again under Connect through SSH; see SSH tunnels.
A password command from pgAdmin runs only after you approve it, as one typed in the form does. pgAdmin runs it through a shell and Alcuin doesn’t, so a pipeline is refused; see Passwords from a command.
Import from .pgpass
Section titled “Import from .pgpass”Choosing the password file makes a connection for each line that names one host, port, database and user.
- The new connections use .pgpass file, so their passwords stay in the file and are read from it at each connect. Nothing is copied to the keychain.
- Lines with
*match many connections, so they are left out. So are connections you already have. - A file that others can read is not used. The menu says
Others can read it, so it isn’t used; runchmod 600 ~/.pgpassand try again.
Connection URLs and .pgpass explains how the file is matched at connect.
Every import opens read-only
Section titled “Every import opens read-only”An imported connection opens read-only, whatever it reaches. One whose group, folder, connection type or name says prod or production is marked Production. The rest have no environment in the file: the message says they open read-only until you pick one in Edit…, and they are listed as Local until you do.
To make one writable, right-click it, choose Edit…, choose its environment under This database is, and turn off Open read-only. See Projects, environments and production.
Importing the same file again adds its connections again. Remove the copies you don’t want.
Check that it worked
Section titled “Check that it worked”The connections are listed in the launcher under their projects, or under Standalone. For each one:
- Right-click it and choose Edit….
- Enter what didn’t come over: the password, the SSH password, the certificate files.
- Click Test connection. On success you see
✓ Connected inand the time. - Click Save.
If the file can’t be read, you see That file is not JSON. Export pgAdmin servers or a DBeaver data-sources.json., or, for JSON from another tool, Neither a pgAdmin servers.json (a "Servers" object) nor a DBeaver data-sources.json (a "connections" object). If a test fails, Connection errors by message has each message and its fix.
To share a project’s connections with a teammate instead, use Export project… and Import project…, which keep everything but the passwords.