Windows & Linux

CLI release

Coming January 2027. The dbHydrate command-line tool isn't available yet. These preview docs describe the planned first release; commands and options may change.
Browse CLI documentation

Export connections and run files

The CLI never asks for a host or a password on the command line. You set connections up and test them in the desktop app, then export them as encrypted files.

On this page

Two kinds of file

dbHydrate CLI file kinds
FileContainsUse it for
.dbhconnOne connectionPairing any source with any target: --source a.dbhconn --target b.dbhconn
.dbhrunA source, a target and a saved profile’s choicesA repeatable release or refresh: --run release.dbhrun

A run file carries the profile’s schema choices, including which schemas to compare, the sync mode and the objects you selected, so the pipeline compares exactly what you reviewed. Connection files compare with default choices.

Export from the desktop app

  1. Choose File, then Export for CLI. You can also right-click a connection, or a saved profile to create a run file.
  2. Give the file a label, such as “Production orders” (up to 80 characters).
  3. Decide whether to include the database password.
  4. Choose how long the file works: 30, 90 or 365 days.
  5. Enter a passphrase, or choose Generate.
  6. Check the summary of what the file contains, then save it. The desktop app registers it with your dbHydrate account.

Export options

Export for CLI options
OptionChoicesAdvice
LabelUp to 80 charactersReadable without the passphrase, so don’t put secrets or hostnames in it.
Include passwordOff (default) or onLeave it off for production and supply the password from your CI secret store.
Lifetime30, 90 or 365 days (default 365)There is no “never expires”. Shorter is safer for production.
PassphraseAt least 12 characters, or GenerateStore it separately from the file, for example in your CI secret store.

What a file contains

What an exported file contains
PartContents
Readable header, signedFile ID, kind, engine, label, environments, owner type, created and expiry dates, encryption settings
EncryptedHost, port, database, user, SSL settings and certificates, SSH tunnel settings and keys, SQL Server sign-in and encryption options, environment protection settings, the profile’s choices, and the password if you included it
Never includedYour master password, other connections, query history, run history or any data

The safety settings travel with the connection. A connection you marked Production or read-only is treated the same way by the CLI.

Files without a password

A file exported without a password needs it at run time:

Code example
export DBHYDRATE_TARGET_PASSWORD="$PROD_DB_PASSWORD"   # from your CI secret store
dbhydrate compare --run release.dbhrun

If such a file leaks, it can’t connect to your database on its own. When you change a database password, files without a password keep working; update the secret instead of re-exporting.

Where to keep files and passphrases

  • The file is encrypted, so it can live in your repository next to the pipeline that uses it.
  • Keep the passphrase, any passwords and the license key in your CI system’s secret store, never in the repository.
  • Use a different passphrase for production files than for test files.

Limits

  • SQL Server connections using Windows authentication can’t be exported, because that sign-in belongs to a Windows account and doesn’t travel to another machine. Use a SQL Server login instead.
  • A connection marked read-only can only be used as a source.
  • Trials can export files. The files run compare and dry-run; apply needs a license.
  • A file belongs to the seat or trial that exported it. Another seat’s license key can’t apply it.
  • An exported file is a snapshot. Changes you make to the connection in the desktop app afterwards need a new export.

Revoke, expire and re-export

Your dbHydrate account lists every exported file with its label, kind, engine, seat, expiry, last use and status. Revoke a file and it stops working everywhere at once, because its key share is deleted. Files also stop on their own when they expire. Export a new file when you need one; the old one can’t be extended.