Short version: your wallet database is in the old bolt format, and the LND that ships on 0.4.0 only reads sqlite. The one-time automatic conversion that should have handled that didn’t run.
LND 0.21 (on 0.4.0) moved off the legacy bolt database to SQLite. Nodes coming from 0.3.5.x are on bolt, so the package runs a one-time conversion the first time LND starts after the update.
That conversion decides whether it’s needed by checking for channel.db, LND’s channel/graph database. That’s a fine signal for an upgrade, but it fails on a restore, because two things are both true:
channel.db is deliberately excluded from backups becasue restoring stale channel state is dangerous, and
- LND only creates
channel.db itself, on first startup.
You restored on 0.3.5.1 and went straight to 0.4.0 without starting LND. So there was no channel.db for the check to find, the conversion concluded there was nothing to convert, and LND 0.21 started on the SQLite backend, found no wallet there, and settled in to wait for a wallet that — from where it’s standing — doesn’t exist.
Your log catches it in the act, just before the stall:
Found existing bbolt database file in /root/.lnd/data/chain/bitcoin/mainnet/wallet.db while using database type sqlite. Existing data will NOT be migrated to sqlite automatically!
And right after, the SQL migrations run against a brand-new empty database — No database version found, All invoices migrated. Total: 0, No payments bucket found - database is empty. That is LND opening a fresh, empty SQLite wallet alongside your real one.
Does the 0.3.5.1-to-0.4.0 service migration preserve both LND’s walletPassword and its restored-node state?
Yes and no.
walletPassword – yes. It was carried across correctly. The unlock helper isn’t failing to send it; it never reaches the point of sending it, because it waits for LND to report a locked wallet and LND is reporting no wallet. That’s also why you saw no error — it’s waiting quietly rather than failing.
- Restored-node state – no. The marker that tells LND to run the channel-backup restore is only set by a restore performed on 0.4.0. Yours happened on 0.3.5.1, and nothing carries it forward. Your
channel.backup file is intact on disk, but the restore won’t run on its own — it’ll need to be triggered as a second step once the wallet is readable.
Had LND been started once on 0.3.5.1 it would have created channel.db, the conversion would have triggered, and your wallet would have converted with it — but you had no way to know that, and it isn’t documented and 99% of people should not be doing this.
Your on-chain keys are still in that bolt wallet.db, and your channel.backup is intact. The data is sitting there unread, not lost.
I’m going to see if I can fix it. The conversion needs to trigger on a restored wallet, not only on the presence of channel.db.