Set up the LakeXpress DB
LakeXpress needs a database of its own, the LakeXpress DB. It stores the sync configurations created by config create, the history and status of every run, and the watermarks of incremental syncs. Every LakeXpress command points to it with --lxdb_auth_id, so it must be set up before the first export.
It is separate from the databases you export from: LakeXpress only writes its own bookkeeping tables there.
Two steps
- You create the database. On PostgreSQL, SQL Server or MySQL, create an empty database and a user that owns it. SQLite and DuckDB need nothing: the file is created on first use.
- LakeXpress creates its tables. Run
lxdb initonce. It creates the tables and checks that the connection works. The firstconfig createorsyncalso creates them if needed.
Choose a backend
| Backend | Server | Good for |
|---|---|---|
| PostgreSQL | Yes | Production, several users or machines sharing the same configurations. Recommended. |
| SQL Server | Yes | Production, when SQL Server is your standard database. |
| MySQL | Yes | Production, when MySQL is your standard database. |
| SQLite | No, a local file | Trying LakeXpress, single-user setups. |
| DuckDB | No, a local file | Trying LakeXpress, single-user setups. |
With SQLite and DuckDB, the configurations and run history live in a file on one machine: syncs must be run from that machine, one at a time.
Initialize it
After adding the LakeXpress DB entry to your credentials file (see the page of your backend), create the tables:
- Windows (PowerShell)
- Linux
.\LakeXpress.exe lxdb init `
-a credentials.json `
--lxdb_auth_id lxdb_postgres
./LakeXpress lxdb init \
-a credentials.json \
--lxdb_auth_id lxdb_postgres
lxdb_postgres is the name of the entry in credentials.json. The command can be run again safely: existing tables and data are kept.
To empty or remove the LakeXpress tables later, see lxdb truncate and lxdb drop in the CLI Reference.