-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi: add migrate-db command #21
base: main
Are you sure you want to change the base?
Conversation
Using this code I was getting an error: So I added a quick patch: getAlby@0ffcae3 And then I was able to do the migration. The last logs were:
It seems everything has migrated succesfully, so I would say that a log line indicating this would also be useful. |
Hello, what happened with this PR? Have been it abandoned? I think this is very useful to migrate an existing bbolt to postgres and following this guide Thanks! |
This is an important PR we need to focus on to allow nodes to finally migrate from kv to native sql. cc @saubyk |
The top-level bucket structure might also have changed somewhat, so we should update that aspect. One other thing is we'll need to figure out a way to ensure that all the data has truly been migrated (eg: we don't forget some other top level bucket recently added). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still testing, but wanted to note some comments
Etcd: &etcd.Config{}, | ||
Bolt: &Bolt{ | ||
DBTimeout: kvdb.DefaultDBTimeout, | ||
Network: "mainnet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need support for networks like testnet and regtest as well
|
||
### Using postgres as the destination remote database | ||
|
||
Prepare a user and database as described in the [Postgres](postgres.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the link be: https://github.com/lightningnetwork/lnd/blob/master/docs/postgres.md?
data migration (e.g. disable any `systemd` or other scripts that start/stop | ||
`lnd`). | ||
|
||
NOTE: If you were using the experimental `etcd` cluster mode that was introduced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a WARNING/CAUTION instead of NOTE
``` | ||
|
||
If you weren't running a watchtower server, you can remove the line with | ||
`--source.bolt.tower-dir`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end with a section advising user to run the migrated node with the updated db config settings
so you mean having the db files constant here (channeldb, towerdb etc) is not enough but we need to also make sure every new bucket is in the new db ? Hmm not sure I understand this one? Because as long as we iterate through each bucket in the db file, there shouldn't be a problem that we miss a bucket ? |
This is work in progress and NOT recommended to be used with production/mainnet data!