Quick start
This walkthrough takes a reviewed schema change from a staging database to production: export once from the desktop app, then compare, rehearse and apply from a terminal.
On this page
Before you start
- The dbHydrate desktop app with a license or an active trial (trials can run
compareanddry-run). - A tested source connection (for example staging) and target connection (for example production) of the same database engine.
- Optionally, a saved Schema Sync profile with the schemas and objects you want to compare.
- A Windows x64 or Linux x64 machine that can reach both databases and
api.dbhydrate.com.
1. Export a run file
- In the desktop app, open your saved profile and choose Export for CLI.
- Label it, for example “Release: staging to production”.
- Leave Include password off for the production target.
- Keep the lifetime at 365 days, and choose Generate to create a passphrase. Copy it into your password manager or CI secret store.
- Save the file as
release.dbhrun.
The file holds both connections and the profile’s choices, encrypted. See export files for every option.
2. Install the CLI
Download the single file for your platform, verify it and put it on your PATH. See install.
dbhydrate --version3. Check the file
file inspect reads only the file’s signed, readable header. It needs no passphrase and doesn’t contact your databases.
$ dbhydrate file inspect release.dbhrun
Kind: run file (source and target)
Engine: PostgreSQL
Label: Release: staging to production
Target: production environment
Owner: license seat
Expires: 2027-11-16
Signature: validSample output, for illustration. The final layout is published at launch.
4. Compare
export DBHYDRATE_CONN_PASSPHRASE="…" # from your password manager
export DBHYDRATE_TARGET_PASSWORD="…" # the file has no target password
dbhydrate compare --run release.dbhrun --report compare.md ~ table public.orders column "discount_code" missing on target
+ index public.idx_orders_date missing on target
2 differences, 0 destructive.The exit code is 1 because differences were found. compare never shows SQL; it lists which objects differ and how.
5. Rehearse with a dry run
dbhydrate dry-run --run release.dbhrun --report dry-run.mdEvery change runs against the target and is then rolled back, so problems such as a missing permission or a value that breaks a new constraint show up before anything changes.
6. Apply
export DBHYDRATE_LICENSE_KEY="…" # the key of the seat that exported the file
dbhydrate apply --run release.dbhrun --confirm-target orders_prod --report apply.md--confirm-target must match the target database’s name. A mistyped name stops before anything changes.
Next steps
- Automate it in CI pipelines.
- Read how a run works and what is checked at each step.
- Review security and data handling with your security team.