-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Right now lndinit migrate-db has --dest.backend default to postgres:
lndinit/docs/data-migration.md
Line 251 in fb30cf3
| --dest.backend=[postgres|sqlite] The destination database backend. (default: postgres) |
. This seems weird to me since we plan to make SQLite the default in future versions of LND. If we expect most users to use SQLite with LND, we should make it the default to encourage everyone to use that and not confuse them with the more complicated postgres option that only advanced users will use. Right now, if the user does not have a postgres server and they don't pass --dest.backend=sqlite, they get an error
2026-01-27 23:16:29.707 [INF]: LNDINIT Opening postgres backend at `` with prefix `channeldb`
2026-01-27 23:16:29.707 [ERR]: LNDINIT Runtime error: failed to open destination db with prefix `channeldb`: failed to connect to `host=/tmp user=zziigg database=`: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory)
Also, we have --source.bolt.data-dir and --dest.sqlite.data-dir. These have no defaults defined in the docs at:
lndinit/docs/data-migration.md
Line 247 in fb30cf3
--source.bolt.data-dir= Lnd data dir where bolt dbs are located. lndinit/docs/data-migration.md
Line 259 in fb30cf3
--dest.sqlite.data-dir= Lnd data dir where sqlite dbs are located.
.
I think they should match the default of LND, which is ~/.lnd/data so that most users don't need to pass any arguments to lndinit migrate-db. When testing, it seems they actually do, so we should document it.
We also have --chunk-size. This has no default defined in the CLI docs:
lndinit/docs/data-migration.md
Line 240 in fb30cf3
| --chunk-size= Chunk size for the migration in bytes |
.
It is defined in data-migration.md at
lndinit/docs/data-migration.md
Line 128 in fb30cf3
| The migration is resumable and happens in chunks of default 20MB to make it |
but all users aren't going to know that from running
lndinit migrate-db -h
and could waste time trying to figure it out. Therefor, we should properly document that a default is actually defined.